0

as I know, the transaction should be confirmed by 11 times then it will be done. but when i use eth_getbalance to get the balance ,it will return some fake balance without confirmed. so How can I get the real balance with json rpc ? thanks for replying!

3
  • Where did you learn that 11 times rule? It's not true. There is a general idea that after 5-6 blocks, the transaction is a trustable as anything, but there's nothing like 'fake balance'.
    – DaveIdito
    Commented Nov 10, 2018 at 13:18
  • eth_getbalance will return the actual balance in the blockchain! Otherwise it won't return anything.
    – DaveIdito
    Commented Nov 10, 2018 at 13:18
  • @DaveIdito thank you ,11times its my mistake. but as I try, when i just transfer with just 1 confirm, the getbalance will get the new balance.
    – liunliun
    Commented Nov 10, 2018 at 13:21

1 Answer 1

0

Requiring X amount of confirmations is just a convention and it varies.

A confirmation in this case refers to a block on top of the block in question. So if the transaction is inside block 7 and you want to have 11 confirmations for the transactions then you just wait until block 18 and see if the transaction is still valid.

The larger the number X, the more likely it is that the transaction will not be removed due to the blockchain reaching a different consensus. In theory it is possible for the blockchain to still revert a transaction after years of it being made but the chances for that are, for all practical reasons, zero. 11 is a pretty secure amount of confirmations (blocks) - different exchanges require different amount of confirmations before the transaction is considered secure enough.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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