Currently, I am running a full node bitcoin daemon configured to publish hash transactions via ZeroMQ (ZMQ). I've been noticing that, as a subscriber to the hashtx topic, there are both confirmed and unconfirmed transactions being broadcasted. I only really care about the unconfirmed transactions. Is there any way to configure the bitcoin daemon (bitcoind) to just broadcast unconfirmed transactions?

There are long stretches of intermittent time, on the order of a few minutes, when ZMQ is broadcasting confirmed transactions, and this behavior is resulting in a "freeze" like state because no new unconfirmed transactions are flowing through (being blocked by the stream of confirmed transactions coming through).

At my application layer, I can filter out for the confirmed transactions, but still, I'd like to stop it at the source if possible.

On another note, why is ZMQ broadcasting both confirmed and unconfirmed transactions? Does this have something to do with the daemon having to update its local copy of the blockchain?

1 Answer 1


With the current Bitcoin Core Version (0.14.2 by the time of writing), this is not possible. A quick hack in CZMQNotificationInterface::SyncTransaction(const CTransaction& tx, const CBlockIndex* pindex, int posInBlock) would be simple (just add an if (!pindex)).

If you don't want to change the sources, you could call gettransaction over RPC and get the confirmation count.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.