3

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 <transaction A's txid>?

3

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

| improve this answer | |
  • 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 Jul 30 at 17:18

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.