0

I can't get my balance on main network. How to get it by geth?

I created an account (0xaabbcc...) by MetaMask. And, I send some eth from my bitflyer account.

enter image description here

Then, I want to get the balance of my account. I have run geth by following command geth --datadir="~/blockchain" --rpc --rpcapi db,eth,net,web3,personal --rpcport 8545 --rpcaddr localhost --rpccorsdomain "*" --cache=1024 console 2>> geth.log. And I executed > eth.getBalance("0xaabbcc..."), but that returned 0.

Why can't I get my balance? Geth ver is 1.8.2-stable.

my geth.log

0

getBalance() can return 0 if the blockchain is not fully synchronized.

Check if web3.eth.blockNumber returns the latest block height.

  • Thank you for your reply. I checked web3.eth.blockNumber, it returned 0 (´・ω・`) – zzz jp Apr 23 '18 at 16:57
  • That probably means your node is not syncing. Can you post the contents of geth.log ? – azavalla Apr 23 '18 at 17:01
  • geth.log is so big... – zzz jp Apr 23 '18 at 17:13
  • Try $ head -n 50 geth.log – azavalla Apr 23 '18 at 17:20
  • I posted the link of my geth.log. – zzz jp Apr 23 '18 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.