remove txCount

pull/171/head
Minh Doan 6 years ago committed by Minh Doan
parent 7e7024720c
commit 4994d875fe
  1. 3
      services/explorer/storage.go
  2. 1
      services/explorer/structs.go

@ -149,12 +149,9 @@ func (storage *Storage) UpdateAddressStorage(adr string, explorerTransaction *Tr
err = rlp.DecodeBytes(data, address)
if err == nil {
address.Balance.Add(address.Balance, tx.Value())
txCount, _ := strconv.Atoi(address.TXCount)
address.TXCount = strconv.Itoa(txCount + 1)
}
} else {
address.Balance = tx.Value()
address.TXCount = "1"
}
address.ID = adr
address.TXs = append(address.TXs, explorerTransaction)

@ -23,7 +23,6 @@ type Data struct {
type Address struct {
ID string `json:"id"`
Balance *big.Int `json:"balance"`
TXCount string `json:"txCount"`
TXs []*Transaction `json:"txs"`
}

Loading…
Cancel
Save