2

My code is below, setting gas to 21000, but I've tried values up to 100000 and nothing works:

eth.sendTransaction({from:eth.coinbase, to:ACCOUNT, value: web3.toWei(30, "ether"), gas:21000})

I've also tried:

eth.sendTransaction({from:eth.coinbase, to:ACCOUNT, value: web3.toWei(30, "ether"), gas:21000, gasPrice:web3.toWei(300, 'gwei')})

Regardless of the gas value I select, I get the error "Exceeds block gas limit"

Any idea how I can get rid of this error?

**This question has been marked as a duplicate of another question, but that question remained unanswered and is pending OP posting their actual code snippet. There aren't helpful answers elsewhere as of yet.

2
  • try 3 000 000 as gas input
    – jayD
    Mar 6, 2016 at 8:29
  • facing exactly same issue but at deploy via truffle Jan 25, 2018 at 13:02

1 Answer 1

2

Are you sure that you are actually connected and synced to the network? I had the exact same issue and that was what fixed it.

Try typing net.peerCount

if it comes up as 0, try this solution: https://github.com/ethereum/go-ethereum/issues/1676#issuecomment-163560490

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