I created an ethereum address
geth account new
and sent some ethers to it. Then I ran the server:
geth
and the JavaScript console:
geth attach
I checked the balance, but it was 0:
> eth.getBalance('0xB97168a67AB66E55B98B1439222Ee665E657fFc0')
0
When I checked the balance via etherchain, there were some ethers.
What am I doing wrong?
It is possible that you are not allowed to participate in the public ethereum network, because your local time might be incorrect (if you are off by 12 seconds it can cause problems already!) or because of your firewall configuration. Check these common connectivity issues for more information. This might cause that the blockchain is not downloaded to your computer at all, which causes that your balance is 0.
One can easily find out whether this is the issue by typing net.peerCount
in the JavaScript console, if it is 0, there is a connectivity problem.
It may be that your node has not downloaded the latest blocks in the blockchain, one of which contains your transaction. See: My ethereum balance returns 0 when checked via geth, but according to etherchain it has a value for more details.
来源:https://stackoverflow.com/questions/36210228/my-ethereum-balance-seems-to-be-0-when-checked-via-geth