0

I am following this article and everything works expected but ether is not getting transferred to the to account.Please find the logs below.

eth.sendTransaction({from:eth.accounts[0], to:eth.accounts[1], value: web3.toWei(4, "ether")})

above line of code runs and miner also get updated with below log.

INFO [09-12|18:03:43.102] Submitted transaction                    fullhash=0xb7810c410aeff448b7785bdaf3d7929dade567a919b35c8d543aa4d85066d322 recipient=0xf74c6516c4f7c87C663f3AEfcE67D815Fb1BF047

But amount after successful transaction always remains zero.

I have searched and applied all the possible workarounds i could find on ethereum stackexchange but nothing helped.

> eth.getBalance(eth.accounts[1])

0
> eth.getBalance(eth.accounts[0])

5.2175e+22
> eth.sendTransaction({from:eth.accounts[0], to:eth.accounts[1], value: web3.toWei(4, "ether")})
"0x6a66d2dbc1610e20405828fdbfbf7b028ec3ce5d20e3800267e0f99b70be1426"
> eth.getBalance(eth.accounts[0])
5.2175e+22
> eth.getBalance(eth.accounts[1])
0
> eth.hashrate
0
> eth.blockNumber
10438

> eth.pendingTransactions
[]
> eth.getTransactionReceipt("0x6a66d2dbc1610e20405828fdbfbf7b028ec3ce5d20e3800267e0f99b70be1426")
{
  blockHash: "0x414049a38df383bfa0e71ad1b1618ff8d08b45ce16064c27aed205d905048e36",
  blockNumber: 10436,
  contractAddress: null,
  cumulativeGasUsed: 42000,
  from: "0x2de46430bc377ad5a1e4c2cdfea7baa1a6baf092",
  gasUsed: 21000,
  logs: [],
  logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  root: "0xa6521114fe5c68ad252b163d7eac7415cd89c6259d8cdee47f681f14cefad6f0",
  to: "0xf74c6516c4f7c87c663f3aefce67d815fb1bf047",
  transactionHash: "0x6a66d2dbc1610e20405828fdbfbf7b028ec3ce5d20e3800267e0f99b70be1426",
  transactionIndex: 1
}
>
  • Did you start mining? – Ha ĐANG Sep 12 '18 at 13:22
  • yes mining was started and going on..please see my answer...thanks for you time. – Alien Sep 12 '18 at 13:25
0

Luckily after posting the question i just restarted the miner like below.

miner.stop()
miner.start(1)

and it worked as expected like below.

> eth.sendTransaction({from:eth.accounts[0], to:eth.accounts[1], value: web3.toWei(4, "ether")})
"0x95dd20206412f8598e6d996d2935ca834e4905c2d9909a4287c382dd9e3497d3"
> eth.getBalance(eth.accounts[0])

5.2438e+22
> eth.getBalance(eth.accounts[1])
12000000000000000000
>

NOTE : I am not deleting this answer and posting my own answer so that somebody might get benefited.

  • Well, this solves the problem but doesn't answer why was it necessary to restart the miner. – Carlos Fuentes Aug 6 at 6:59

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.