0

I synced my node and still the balance of my account 0x296A36E8E5A164FB91c96CBDFA7E92dCdA29805C keeps returning 0.

The block that my transaction was made is 7227432 and the block I am currently on my node is 7235033. If I run the getTransaction ('0x296A36E8E5A164FB91c96CBDFA7E92dCdA29805C') it brings the data, but still the balance is 0.

I used the --syncmode = fast, I heard that fast does not bring balance is true? Where am I going wrong?

  • How are you reading the balance? – flygoing Feb 18 at 14:20
  • @flygoing eth.getBalance(eth.accounts[0]); – Ingrid Cristaldo Feb 18 at 14:27
1

No, fast nodes do bring balances the same well as full nodes. For modern implementations, the only difference between full and fast nodes is whether they download initial blockchain state from other nodes (thus trusting them) or calculate it themselves. After initial state is downloaded/calculated, there is no difference at all.

The account you are referring to definitely has non-zero balance in main network. There may be a number of reasons why you don't see this balance in your node:

  1. Your node is synchronizing with different network, such as Ethereum Classic or one of test networks. It is also possible that your node missed some of the recent hard forks. Make sure you are using latest stable version of node software, and that you does not use options such as --testnet, --rinkeby, --dev, etc.
  2. Tour node is not yet synchronized. Try eth.syncing in console, it should return false in case you node is synchronized.
  3. Value of eth.accounts[0] is different from the address you referred to in your question. Try calling web3.eth.getBalance ("0x296A36E8E5A164FB91c96CBDFA7E92dCdA29805C").

Also, method web3.eth.getTransaction expects transaction hash as a parameter, rather than an address.

0

I suggest that you try using a remote node provided by infura to connect to the same network and then try to get the balance of that account.

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.