<p>A will be kicked out of the mempool when that block is received, and <code>getrawtransaction</code> will subsequently fail for it.</p>

CC BY-SA 4.0
2020-07-30T17:18:53.947Z
Is there a good way to differentiate between getting kicked due to a double spend, vs getting kicked from the mempool due to a low fee for too long in a high volume environment?
I know we could keep track of the transaction's inputs, and check if any of these inputs have been spent, but wondering if there's an easier way that doesn't require keeping track of inputs.
deezy
CC BY-SA 4.0
2020-03-26T16:42:04.923Z
2020-03-26T16:42:04.923Z
Pieter Wuille
<p>Say I receive transaction A and it is in my node's mempool and unconfirmed.</p>

<p>Then a block gets mined directly, which spends one of transaction A's inputs, rendering transaction A invalid.</p>

<p>What can I expect my node to respond with, when I ask: <code>getrawtransaction &lt;transaction A's txid&gt;</code>?</p>

<transactions><bitcoind><doublespend><getrawtransaction>
Handling "dead" (double-spent) transactions in my mempool
deezy
# Handling "dead" (double-spent) transactions in my mempool

(Asked by: username_0 on 2020-03-26)

Say I receive transaction A and it is in my node's mempool and unconfirmed.

Then a block gets mined directly, which spends one of transaction A's inputs, rendering transaction A invalid.

What can I expect my node to respond with, when I ask: `getrawtransaction` ?

**Tags:** transactions, bitcoind, doublespend, getrawtransaction


---

## 1 answers

### Answer by username_1 on 2020-03-26. Score: 3 | Accepted answer

A will be kicked out of the mempool when that block is received, and `getrawtransaction` will subsequently fail for it.

> **Comments:**
> **username_0**: Is there a good way to differentiate between getting kicked due to a double spend, vs getting kicked from the mempool due to a low fee for too long in a high volume environment? I know we could keep track of the transaction's inputs, and check if any of these inputs have been spent, but wondering if there's an easier way that doesn't require keeping track of inputs.  

---

