1

As per What’s the role of the EVM in a plain ether transfer between Externally Owned Accounts?, one would expect that the sending account will get debited right after the transfer call. Yet, that does not happen. Am I missing something obvious?

  • I think that the block chain has to be updated, and the my Geth instance has to download that block to see that there was a transfer and only then eth.getBalance call will return the new balance for the sending account. – devsubhro Jul 22 '16 at 15:41
1

The value will be debited from the sending account once the transaction is included in a block. Until then, while the transaction is in the mempool (pending inclusion in a block), geth maintains a temporary state which will also have decreased the balance, but which will only be returned by getBalance if you have mining activated.

  • Thanks, this explains it. I am not running Geth in mining mode, sogetBalance() will not return the decreased amount. I have to wait till the sending transaction is included in a block and then getBalance() will return the decreased amount. – devsubhro Jul 25 '16 at 7:10

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.