aboutsummaryrefslogtreecommitdiff
path: root/src/zmq
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@pm.me>2022-11-10 16:09:25 -0500
committerJames O'Beirne <james.obeirne@pm.me>2023-09-30 06:38:47 -0400
commitf073917a9e7ba423643dcae0339776470b628f65 (patch)
tree7aa1dd7d405dbc63dc7f5ccdae54d38e7131e4c7 /src/zmq
parent4d8f4dcb450d31e4847804e62bf91545b949fa14 (diff)
validationinterface: only send zmq notifications for active
Diffstat (limited to 'src/zmq')
-rw-r--r--src/zmq/zmqnotificationinterface.cpp3
1 files changed, 3 insertions, 0 deletions
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<const CBlock>& pblock, const CBlockIndex* pindexConnected)
{
+ if (role == ChainstateRole::BACKGROUND) {
+ return;
+ }
for (const CTransactionRef& ptx : pblock->vtx) {
const CTransaction& tx = *ptx;
TryForEachAndRemoveFailed(notifiers, [&tx](CZMQAbstractNotifier* notifier) {