How to Rebroadcast a Bitcoin Transaction

How to rebroadcast a stuck Bitcoin transaction that dropped out of the mempool: why transactions disappear, where to get the signed raw hex (a TXID alone is not enough), which tools to push it with, and what each rejection message means.

·6min
When a Transaction Gets Stuck, part 7 of 7
  1. Why Bitcoin Fees Suddenly Spike Out of Nowhere
  2. Checking for Yourself That Bitcoin Actually Arrived
  3. I Sent Bitcoin and It Never Arrived
  4. Replace-by-Fee (RBF)
  5. Child Pays for Parent (CPFP)
  6. How to Broadcast a Bitcoin Transaction
  7. How to Rebroadcast a Bitcoin Transaction
See the whole series →
Contents

Your wallet still says "unconfirmed", but a block explorer answers your TXID with "Transaction not found". Most people then look for a rebroadcast tool with a box for the TXID. That box does not exist, because a node does not accept a TXID. It accepts the signed raw transaction (the raw hex). The TXID is a hash of that raw transaction, and a hash cannot be turned back into the data it came from. So rebroadcasting starts with getting the raw transaction back.

Why a Transaction Drops Out of the Mempool

Every node keeps its own mempool and evicts transactions by its own rules. With Bitcoin Core's defaults, three cases cover most of what happens.

  • 14-day expiry - a transaction that has not made it into a block within 336 hours (the -mempoolexpiry default) is removed.
  • Full mempool - above the default 300 MB limit, the node evicts the lowest-feerate transactions first and raises the minimum feerate it will accept (mempoolminfee). The floor comes back down once congestion clears.
  • Only some nodes took it in the first place - the minimum relay fee differs between nodes. Bitcoin Core 30.0 lowered its default from 1 sat/vB to 0.1 sat/vB, but earlier versions and Bitcoin Knots still default to 1 sat/vB. A transaction paying between 0.1 and 1 sat/vB can be visible on one explorer and missing on another.

Dropping out of the mempool does not cancel a transaction. The UTXOs it spends are still unspent, and anyone holding the signed raw transaction can broadcast it again. Sometimes it survives in another node's mempool and comes back on its own after congestion eases.

First Check Whether It Is Really Gone

Missing from one explorer does not mean missing from the network. Each explorer runs its own nodes and shows you their mempool.

  1. Look up the TXID on two or three explorers: txid.uk, mempool.space, blockstream.info.
  2. If any of them still shows it as unconfirmed, the transaction is alive. What you need then is a fee bump, not a rebroadcast (fixing a stuck transaction).
  3. If it is already confirmed, there is nothing to do. Your wallet simply synced late.

Getting the Signed Raw Hex

The raw transaction usually still lives where it was signed, in your wallet.

  • Bitcoin Core wallet - the hex field of bitcoin-cli gettransaction <txid> is the raw transaction. The Core wallet also rebroadcasts its own unconfirmed transactions on its own, every 12 to 36 hours (only those more than 5 minutes older than the last block).
  • Other wallets - the transaction details screen usually has an option to view the raw transaction, copy the hex, or export it. The wording differs from wallet to wallet.
  • While an explorer still remembers it - mempool.space returns the raw transaction at https://mempool.space/api/tx/<txid>/hex. Once it has dropped from that explorer's node as well, this no longer works.

If the raw transaction is nowhere to be found, it has to be signed again. At that point you are better off building a new transaction with a higher fee than reviving the old one (see the last section).

Broadcasting It Again

Anything that accepts raw hex will do.

  • Paste it into txid.uk TX Broadcast and send
  • mempool.space/tx/push or blockstream.info/tx/push
  • Your own node: bitcoin-cli sendrawtransaction <hex>
  • An API: curl -X POST -d '<hex>' https://mempool.space/api/tx

On success you get the same TXID back. Because minimum relay fees differ between nodes, a transaction paying under 1 sat/vB is worth sending to more than one place. Step-by-step instructions for each method are in How to Broadcast a Bitcoin Transaction.

Reading the Rejection Message

When a rebroadcast fails, the node tells you why in a short string. These are the strings Bitcoin Core uses.

MessageMeaningWhat to do
txn-already-in-mempoolThis node already has the transactionNo rebroadcast needed. If another explorer does not show it, send it there
Transaction outputs already in utxo set / txn-already-knownIt is already in a blockCheck the confirmation
bad-txns-inputs-missingorspentAn input was already spent by another transaction, or this node does not know the parentCheck whether a transaction spending the same input confirmed. If the parent is unconfirmed, send the parent first
min relay fee not metThe feerate is below that node's minimum relay feeSend it to a different node, or raise the fee with a new transaction
mempool min fee not metThe mempool is full and its floor has risenWait for congestion to clear, or use CPFP or a new transaction
insufficient feeAnother transaction spending the same inputs is already in the mempool, and this one does not pay enough to replace itThe one in the mempool is the live transaction
non-finalIts nLockTime has not been reachedWait until the block height or time it specifies

When a New Transaction Beats a Rebroadcast

A transaction that dropped out because its feerate was too low will get pushed out again for the same reason if you send the same bytes. In that case, replacing it with a new transaction that spends the same inputs at a higher fee is the reliable route.

  • RBF - since Bitcoin Core 28.0, mempoolfullrbf is on by default, so a transaction without the BIP-125 signal can still be replaced by one paying more.
  • CPFP - if you are the recipient or have a change output, a child transaction can pull the parent along. If the parent has left the mempool, the two have to be sent together.
  • The Bitcoin Core wallet keeps a dropped transaction marked as unconfirmed and will not let you spend its inputs again. If the transaction is not in the mempool, bitcoin-cli abandontransaction <txid> releases it so you can send a new one.

If the old raw transaction resurfaces somewhere after that, it cannot replace the higher-fee transaction already in the mempool and gets rejected. Only one of the two can ever make it into a block, so no double spend results.

Further Reading

Discuss on community →

Related