This adds a rawmempooltx
publisher that only notifies raw transactions that are added to the mempool. The existing rawtx
publisher notifies of transactions added to mempool and transactions appearing in blocks, causing raw transactions to often be published multiple times.
This caused confusion in #23471 (review), Ali Sherief [asked] for such a patch on the bitcoin-dev mailing list, and I’ve needed a ZMQ publisher for only mempool transactions multiple times. Also partially fixes #16180 from what I can tell.
I’ll leave this as a draft for now until:
- I’ve gotten a few Concept ACKs that we want to add another publisher only for tx added to the mempool. (An alternative could be to extend the current rawtx publisher to include information about the reason for a transaction notification (mempool/block)).
- I’ll add functional tests
- I’ve gotten feedback on the publisher name
rawmempooltx
I’d additionally find it useful to have an ZMQ multipart message part containing the transaction fee for mempool transactions. This requires us to change the interface though. I think this is out of scope for this PR.