Revert "Merge pull request #1456 from rlan35/wallet-fix"

This reverts commit 3d5c9e8132, reversing
changes made to 5d6e619a07.
pull/1464/head
Eugene Kim 5 years ago
parent 2036f6cbd1
commit cb0299ba6f
  1. 8
      cmd/client/wallet/main.go

@ -810,8 +810,9 @@ func FetchBalance(address common.Address) []*AccountState {
for shardID := 0; shardID < walletProfile.Shards; shardID++ {
go func(shardID int) {
defer wg.Done()
balance := big.NewInt(-1)
balance := big.NewInt(0)
var nonce uint64
result[uint32(shardID)] = &AccountState{balance, 0}
var wgShard sync.WaitGroup
wgShard.Add(len(walletProfile.RPCServer[shardID]))
@ -851,9 +852,8 @@ func FetchBalance(address common.Address) []*AccountState {
}(rpcServerID)
}
wgShard.Wait()
if balance.Cmp(big.NewInt(-1)) > 0 {
result[shardID] = &AccountState{balance, nonce}
}
result[shardID] = &AccountState{balance, nonce}
}(shardID)
}
wg.Wait()

Loading…
Cancel
Save