9

I've sent a simple transaction (no smart contract invocation) while my geth node had no peers attached. It created the transaction fine and returned a transaction identifier.

Even with many nodes connected now, I cannot find this transaction on any block explorer. I presume this means it wasn't broadcasted?

How can I rebroadcast the transaction?

11

Just use eth.pendingTransactions to find the transaction you want to resend.

Then

var tx = eth.pendingTransactions[index], replacing index with the index of the transaction you want to resend.

Then

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

This allows you to change the gas price and gas limit of the resent transaction.

From the docs.

  • 1
    Great explanation, but given the number of steps and the fact that code is involved I don't know if you can get away with "just" :) – Jeff Coleman Jan 26 '16 at 8:25
  • 2
    Note that pendingTransactions is an array, not a function, so you would retrieve the first pending transaction with var tx = eth.pendingTransactions[0], without parentheses. – carver May 3 '17 at 2:33
  • 1
    eth.resend(eth.pendingTransactions[0]) Error: Transaction 0885f7449756ae676259370a7c20dcf1c983f4276b7b333de505460928c1b164 not found – cobordism Jun 21 '17 at 11:42
2

For what is worth, slightly related.

I've sent a transaction from MetaMask with low gas price.

I was searching for a solution to fix it.

Luckily MetaMask offers a convenient solution:

enter image description here

(great feature, thank you developers)

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.