diff options
author | James O'Beirne <james.obeirne@gmail.com> | 2019-09-23 13:54:21 -0400 |
---|---|---|
committer | James O'Beirne <james.obeirne@pm.me> | 2023-09-30 06:38:47 -0400 |
commit | 4d8f4dcb450d31e4847804e62bf91545b949fa14 (patch) | |
tree | 969db62e4210a1fdf9eeceeb39e4c2755cad051d /src/zmq | |
parent | 1e59acdf17309f567c370885f0cf02605e2baa58 (diff) | |
download | bitcoin-4d8f4dcb450d31e4847804e62bf91545b949fa14.tar.xz |
validation: pass ChainstateRole for validationinterface calls
This allows consumers to decide how to handle events from background or
assumedvalid chainstates.
Diffstat (limited to 'src/zmq')
-rw-r--r-- | src/zmq/zmqnotificationinterface.cpp | 3 | ||||
-rw-r--r-- | src/zmq/zmqnotificationinterface.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/zmq/zmqnotificationinterface.cpp b/src/zmq/zmqnotificationinterface.cpp index 6755368249..97355b45a7 100644 --- a/src/zmq/zmqnotificationinterface.cpp +++ b/src/zmq/zmqnotificationinterface.cpp @@ -5,6 +5,7 @@ #include <zmq/zmqnotificationinterface.h> #include <common/args.h> +#include <kernel/chain.h> #include <logging.h> #include <primitives/block.h> #include <primitives/transaction.h> @@ -170,7 +171,7 @@ void CZMQNotificationInterface::TransactionRemovedFromMempool(const CTransaction }); } -void CZMQNotificationInterface::BlockConnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexConnected) +void CZMQNotificationInterface::BlockConnected(ChainstateRole role, const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexConnected) { for (const CTransactionRef& ptx : pblock->vtx) { const CTransaction& tx = *ptx; diff --git a/src/zmq/zmqnotificationinterface.h b/src/zmq/zmqnotificationinterface.h index ce67633b30..4246c53bd3 100644 --- a/src/zmq/zmqnotificationinterface.h +++ b/src/zmq/zmqnotificationinterface.h @@ -33,7 +33,7 @@ protected: // CValidationInterface void TransactionAddedToMempool(const CTransactionRef& tx, uint64_t mempool_sequence) override; void TransactionRemovedFromMempool(const CTransactionRef& tx, MemPoolRemovalReason reason, uint64_t mempool_sequence) override; - void BlockConnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexConnected) override; + void BlockConnected(ChainstateRole role, const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexConnected) override; void BlockDisconnected(const std::shared_ptr<const CBlock>& pblock, const CBlockIndex* pindexDisconnected) override; void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override; |