Simple eth.getBalance() not working as expected

motoaddictmotoaddict Fort Myers, FloridaMember Posts: 52
edited July 2015 in web3-js
[email protected]:~/bin$ geth attach
instance: Geth/v0.9.36/linux/go1.4.2
 datadir: /mnt/ethdb
coinbase: 0x4aed8f852020e7596da9ac7f6f0b562864c48bb2
at block: 780334 (2015-07-03 11:07:39)
 modules: admin:1.0 db:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 shh:1.0 txpool:1.0 web3:1.0
> eth.coinbase
> eth.getBalance();
> eth.getBalance(eth.coinbase);
Why does "eth.getBalance(eth.coinbase);" return 0?? I only have one account:
Post edited by StephanTual on


  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
    eth.getBalance(); default to the null address (an address full of 0000000s) - some people have mined into that hence why you're seeing a balance.

    0x4aed8f852020e7596da9ac7f6f0b562864c48bb2 has a nil balance so '0' sounds about right for eth.getBalance(eth.coinbase);
Sign In or Register to comment.