From f073917a9e7ba423643dcae0339776470b628f65 Mon Sep 17 00:00:00 2001 From: James O'Beirne Date: Thu, 10 Nov 2022 16:09:25 -0500 Subject: validationinterface: only send zmq notifications for active --- src/zmq/zmqnotificationinterface.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/zmq') diff --git a/src/zmq/zmqnotificationinterface.cpp b/src/zmq/zmqnotificationinterface.cpp index 97355b45a7..03aae86577 100644 --- a/src/zmq/zmqnotificationinterface.cpp +++ b/src/zmq/zmqnotificationinterface.cpp @@ -173,6 +173,9 @@ void CZMQNotificationInterface::TransactionRemovedFromMempool(const CTransaction void CZMQNotificationInterface::BlockConnected(ChainstateRole role, const std::shared_ptr& pblock, const CBlockIndex* pindexConnected) { + if (role == ChainstateRole::BACKGROUND) { + return; + } for (const CTransactionRef& ptx : pblock->vtx) { const CTransaction& tx = *ptx; TryForEachAndRemoveFailed(notifiers, [&tx](CZMQAbstractNotifier* notifier) { -- cgit v1.2.3