2

I have a private ethereum network with two nodes (geth), where one node is a miner.

There are two accounts in the network, one for each node, both having ether.

If I try to send a transaction from the miner node, it works fine.

> balance = web3.fromWei(eth.getBalance("0x30b4d1516775c89b59bdfc2e17a72aa250cdff7a"), "ether");

150

eth.sendTransaction({from:"0xe7d3b4f60d7baea5b6309b7601ad4785c98d46da", to:"0x30b4d1516775c89b59bdfc2e17a72aa250cdff7a", value: web3.toWei(50, "ether")})

> balance = web3.fromWei(eth.getBalance("0x30b4d1516775c89b59bdfc2e17a72aa250cdff7a"), "ether");

200

Balance is correctly reflected in both nodes.

But, if I try to send a transaction from the non-miner node, it doesn't get included (balance of the sender account stays the same).

If I stop the miner node, and then start mining in the previous non-miner node, previously sent transaction gets included and balance of the sender account gets reduced. If I start the stopped node again, it too reflects the new balance.

What could be the reason for this?

  • It looks like the transaction from the non-miner node is being broadcasted to the miner node. You need to provide more details about the outputs. What is the result when you initiate a transaction from the non-miner node? Are you getting a transaction hash? Are these two nodes connected? Try eth.pendingTransactions in the miner node and see if the transaction from the non-miner node can be seen. – galahad Nov 2 '16 at 6:19

Your Answer

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

Browse other questions tagged or ask your own question.