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

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

CC BY-SA 3.0
2017-04-19T09:05:33.677Z
2017-04-19T09:05:33.677Z
Jonas Schnelli
<p>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 <code>hashtx</code> 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?</p>

<p>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).</p>

<p>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.</p>

<p>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?</p>

<transactions><bitcoind><unconfirmed-transactions><raw-transaction><zeromq>
Is it possible to configure the bitcoin daemon to only broadcast unconfirmed transactions with ZeroMQ?
Jane Wayne
# Is it possible to configure the bitcoin daemon to only broadcast unconfirmed transactions with ZeroMQ?

(Asked by: username_0 on 2017-04-19)

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?

**Tags:** transactions, bitcoind, unconfirmed-transactions, raw-transaction, zeromq


---

## 1 answers

### Answer by username_1 on 2017-04-19. Score: 1 | Accepted answer

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.


---

