11

If I send an Ethereum transaction that has not yet been confirmed by the network can I rebroadcast the same transaction with a higher fee and a new destination address?

2 Answers 2

11

With Geth, you can rebroadcast with a higher fee (gas price), but you cannot change the destination address.

eth.resend(tx, optional gas price, optional gas limit)

Example:

eth.sendTransaction({from: eth.accounts[0], to: "...", gasPrice: "1000"}) var tx = eth.pendingTransactions[0] eth.resend(tx, web3.toWei(10, "szabo")) 
1
  • broken anchor in the link Commented Nov 18, 2017 at 5:33
1

Yes. If a miner sees two transactions with the same account and nonce, the software currently being run by most mining nodes will keep the transaction in their pending pool that has the higher gas price.

Note: I believe either Geth or Parity has some logic that will make it so it won't replace a transaction that has an insignificantly higher gas price (e.g., 1 attoeth). In this situation, the transaction the miner saw first will be mined. I don't know the exact details but I'm happy to update this answer if someone else does.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.