[ethereum/go-ethereum] ‘eth.getBalance’ and ‘client.BalanceAt’ balances do not match in rinkeby (#17143)

‘eth.getBalance’ and ‘client.BalanceAt’ balances do not match in rinkeby

#### System information
Geth version: `geth 1.8.11-stable`
OS & Version: OSX

this is my geth “geth –rinkeby –syncmode=fast –ethstats=’sunbo:Respect my authoritah!@stats.rinkeby.io’ –datadir testNet –port 28000 –rpc –rpcaddr –rpcport 8545 –rpcapi ‘db,net,eth,web3’ –rpccorsdomain ‘*’ console 2>> test.log”

> eth.getBalance(“0x4076a5f13fe75e9658035b52c09026344de9e03d”)

But when I got it in golang, it was like this

func (eth*Ethereum)GetBalance(address string) (float64,error) {
balance, err := eth.client.BalanceAt(context.Background(),common.HexToAddress(address),nil)
if err != nil {
return 0,err
} else {

balanceV := float64(balance.Int64()) * math.Pow(10, -18)
return balanceV,nil
So I don’t know why the results are different

This post was last modified on July 8, 2018, 6:56 am