<p>The option to abandon a transaction is only available if a) it has not been abandoned before, b) neither the transaction or a conflicting transaction is confirmed, and c) the transaction is <strong>not in your own node’s mempool</strong>.</p>
<p>Note that even when you abandon a transaction it might still be retained by other nodes. The only way to be sure that your original transaction cannot be mined in the future is to create a conflicting transaction that spends some of the same inputs and get it confirmed in the blockchain. This is exactly the intent behind <code>abandontransaction</code>. You inform your wallet that you are no longer pursuing confirmation for the abandoned transaction which instructs the wallet to permit reuse of the inputs used in it.</p>

CC BY-SA 4.0
2023-12-20T23:23:15.167Z
How do I drop the transaction from my own mempool in Bitcoin Core?
LOST
CC BY-SA 4.0
2023-12-21T01:30:15.270Z
Hi @LOST, if you have a new question, please start a new topic.
Murch
CC BY-SA 4.0
2023-09-26T15:01:45.683Z
2023-09-26T15:13:24.283Z
2023-09-26T15:13:24.283Z
Murch
<p>From the source:</p>
<p><a href="https://github.com/bitcoin/bitcoin/blob/ac9fa6ec78158e41006d621ee62e44dec0f934c0/src/wallet/wallet.cpp#L1290" rel="nofollow noreferrer"><code>src/wallet/wallet.cpp</code>:1290</a>:</p>
<pre class="lang-cpp prettyprint-override"><code>return wtx &amp;&amp; !wtx-&gt;isAbandoned() &amp;&amp; GetTxDepthInMainChain(*wtx) == 0 &amp;&amp; !wtx-&gt;InMempool();
</code></pre>
<p>Basically, it's abandoned if it's dropped out of one's own node's mempool.</p>

CC BY-SA 4.0
2023-09-24T22:19:18.440Z
@MichaelFolkson Sure, the TXN could be in _someone's_ mempool. (And technically a miner could mine the pre-RBF transaction…)
Geremia
CC BY-SA 4.0
2023-09-26T15:03:38.980Z
The last sentence would be more precise if it were something like: “it _can be_ abandoned only if it has been dropped from _your own node’s mempool_”.
Murch
CC BY-SA 4.0
2023-09-24T00:06:26.477Z
2023-09-28T23:58:44.570Z
2023-09-28T23:58:44.570Z
Geremia
<p>Right-clicking on an unconfirmed transaction pops up a contextual menu that has the option &quot;Abandon transaction&quot;. It is usually grayed out. How much time needs to pass for Bitcoin Core to allow one to choose &quot;Abandon transaction&quot;?</p>
<p>When I run <code>abandontransaction</code> on my transaction, it says:</p>
<blockquote>
<p>Transaction not eligible for abandonment (code -5)</p>
</blockquote>

<bitcoin-core><unconfirmed-transactions>
When does Bitcoin Core allow you to "Abandon transaction"?
Geremia
# When does Bitcoin Core allow you to "Abandon transaction"?

(Asked by: username_0 on 2023-09-23)

Right-clicking on an unconfirmed transaction pops up a contextual menu that has the option "Abandon transaction". It is usually grayed out. How much time needs to pass for Bitcoin Core to allow one to choose "Abandon transaction"?

When I run `abandontransaction` on my transaction, it says:

> Transaction not eligible for abandonment (code -5)

**Tags:** bitcoin-core, unconfirmed-transactions


---

## 2 answers

### Answer by username_0 on 2023-09-24. Score: 5 | Accepted answer

From the source:
src/wallet/wallet.cpp:1290:
return wtx && !wtx->isAbandoned() && GetTxDepthInMainChain(*wtx) == 0 && !wtx->InMempool();

Basically, it's abandoned if it's dropped out of one's own node's mempool.

> **Comments:**
> **username_0**: @MichaelFolkson Sure, the TXN could be in _someone's_ mempool. (And technically a miner could mine the pre-RBF transaction…)  
> **username_1**: The last sentence would be more precise if it were something like: “it _can be_ abandoned only if it has been dropped from _your own node’s mempool_”.  

---

### Answer by username_1 on 2023-09-26. Score: 2

The option to abandon a transaction is only available if a) it has not been abandoned before, b) neither the transaction or a conflicting transaction is confirmed, and c) the transaction is **not in your own node’s mempool**.

Note that even when you abandon a transaction it might still be retained by other nodes. The only way to be sure that your original transaction cannot be mined in the future is to create a conflicting transaction that spends some of the same inputs and get it confirmed in the blockchain. This is exactly the intent behind `abandontransaction`. You inform your wallet that you are no longer pursuing confirmation for the abandoned transaction which instructs the wallet to permit reuse of the inputs used in it.

> **Comments:**
> **username_2**: How do I drop the transaction from my own mempool in Bitcoin Core?  
> **username_1**: Hi @username_2, if you have a new question, please start a new topic.  

---

