5

I'm trying to resend a transaction unrecognized by network with increased gas price:

tx = eth.pendingTransactions[0]
eth.resend(tx, web3.toWei(0.5, "szabo"))

What I'm getting is:

Transaction 0x1c6f5e5ffd2109167fa2bad731224d5e5b3cec8a654debffaa665bdc12969020 not found
at web3.js:3119:20
at web3.js:6023:15
at web3.js:4995:36
at <anonymous>:1:1

What's wrong?

2
  • maybe it was commited to a block already?
    – q9f
    Oct 19, 2016 at 12:11
  • I'm having the same issue. Did you ever find out what was wrong?
    – cobordism
    Jun 21, 2017 at 11:43

1 Answer 1

4

Running this patch at the console works for me:

eth.resend = function (tx, gasPrice, gas) {
  if (gasPrice) {
    tx.gasPrice = gasPrice;
  }
  if (gas) {
    tx.gas = gas;
  }
  tx.data = tx.input;
  return eth.sendTransaction(tx);
};

I prefer to also add this convenience version:

eth.resendgwei = function (tx, gasPriceInGwei, gas) {
  if (gasPriceInGwei) {
    return eth.resend(tx, web3.toWei(gasPriceInGwei, 'gwei'), gas);
  }
  else {
    return eth.resend(tx, null, gas);
  }
};

Now, if your pending transaction is stuck because the gas price is too low, you can speed it up with:

eth.resendgwei(eth.pendingTransactions[0], 51);

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.