I am working with Bitcoin Core version 25.0 and am facing a question about handling mempool transactions evicted for non-block inclusion reasons. My query pertains to any transaction that has existed in my node’s mempool at some point, not just those constructed by me.
Context:
In instances where a transaction is evicted from the mempool for reasons other than block inclusion, I am interested in understanding the duration for which it remains accessible for querying through an RPC command.
Specific Questions:
Duration of Accessibility: How long does a transaction, evicted for non-block inclusion reasons, remain queryable in Bitcoin Core version >=25.0?
RPC Methods: Is there a method or RPC command to look up details of these non-block inclusion evicted mempool transactions by their transaction ID?
What I’ve Tried:
I have used the getrawtransaction
command with -txindex
enabled. While it successfully retrieves transactions in the mempool or any block, it seems to fail for transactions evicted for non-block inclusion reasons, resulting in an error.
500 Internal Server Error (Code: -5, Message: No such mempool or blockchain transaction. Use gettransaction for wallet transactions).