diff --git a/src/index/base.h b/src/index/base.h --- a/src/index/base.h +++ b/src/index/base.h @@ -64,10 +64,8 @@ bool Commit(); protected: - void - BlockConnected(const std::shared_ptr &block, - const CBlockIndex *pindex, - const std::vector &txn_conflicted) override; + void BlockConnected(const std::shared_ptr &block, + const CBlockIndex *pindex) override; void ChainStateFlushed(const CBlockLocator &locator) override; diff --git a/src/index/base.cpp b/src/index/base.cpp --- a/src/index/base.cpp +++ b/src/index/base.cpp @@ -189,9 +189,8 @@ return true; } -void BaseIndex::BlockConnected( - const std::shared_ptr &block, const CBlockIndex *pindex, - const std::vector &txn_conflicted) { +void BaseIndex::BlockConnected(const std::shared_ptr &block, + const CBlockIndex *pindex) { if (!m_synced) { return; } diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -273,10 +273,7 @@ virtual void transactionAddedToMempool(const CTransactionRef &tx) {} virtual void transactionRemovedFromMempool(const CTransactionRef &ptx) { } - virtual void - blockConnected(const CBlock &block, - const std::vector &tx_conflicted, - int height) {} + virtual void blockConnected(const CBlock &block, int height) {} virtual void blockDisconnected(const CBlock &block, int height) {} virtual void updatedBlockTip() {} virtual void chainStateFlushed(const CBlockLocator &locator) {} diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp --- a/src/interfaces/chain.cpp +++ b/src/interfaces/chain.cpp @@ -78,12 +78,9 @@ void TransactionRemovedFromMempool(const CTransactionRef &tx) override { m_notifications->transactionRemovedFromMempool(tx); } - void BlockConnected( - const std::shared_ptr &block, - const CBlockIndex *index, - const std::vector &tx_conflicted) override { - m_notifications->blockConnected(*block, tx_conflicted, - index->nHeight); + void BlockConnected(const std::shared_ptr &block, + const CBlockIndex *index) override { + m_notifications->blockConnected(*block, index->nHeight); } void BlockDisconnected(const std::shared_ptr &block, const CBlockIndex *index) override { diff --git a/src/net_processing.h b/src/net_processing.h --- a/src/net_processing.h +++ b/src/net_processing.h @@ -55,10 +55,8 @@ /** * Overridden from CValidationInterface. */ - void - BlockConnected(const std::shared_ptr &pblock, - const CBlockIndex *pindexConnected, - const std::vector &vtxConflicted) override; + void BlockConnected(const std::shared_ptr &pblock, + const CBlockIndex *pindexConnected) override; void BlockDisconnected(const std::shared_ptr &block, const CBlockIndex *pindex) override; /** diff --git a/src/net_processing.cpp b/src/net_processing.cpp --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1441,8 +1441,7 @@ * block. Also save the time of the last tip update. */ void PeerLogicValidation::BlockConnected( - const std::shared_ptr &pblock, const CBlockIndex *pindex, - const std::vector &vtxConflicted) { + const std::shared_ptr &pblock, const CBlockIndex *pindex) { { LOCK(g_cs_orphans); diff --git a/src/test/validation_block_tests.cpp b/src/test/validation_block_tests.cpp --- a/src/test/validation_block_tests.cpp +++ b/src/test/validation_block_tests.cpp @@ -50,10 +50,8 @@ BOOST_CHECK_EQUAL(m_expected_tip, pindexNew->GetBlockHash()); } - void - BlockConnected(const std::shared_ptr &block, - const CBlockIndex *pindex, - const std::vector &txnConflicted) override { + void BlockConnected(const std::shared_ptr &block, + const CBlockIndex *pindex) override { BOOST_CHECK_EQUAL(m_expected_tip, block->hashPrevBlock); BOOST_CHECK_EQUAL(m_expected_tip, pindex->pprev->GetBlockHash()); diff --git a/src/validation.cpp b/src/validation.cpp --- a/src/validation.cpp +++ b/src/validation.cpp @@ -3046,8 +3046,7 @@ for (const PerBlockConnectTrace &trace : connectTrace.GetBlocksConnected()) { assert(trace.pblock && trace.pindex); - GetMainSignals().BlockConnected(trace.pblock, trace.pindex, - trace.conflictedTxs); + GetMainSignals().BlockConnected(trace.pblock, trace.pindex); } } while (!m_chain.Tip() || (starting_tip && CBlockIndexWorkComparator()( diff --git a/src/validationinterface.h b/src/validationinterface.h --- a/src/validationinterface.h +++ b/src/validationinterface.h @@ -141,10 +141,8 @@ * * Called on a background thread. */ - virtual void - BlockConnected(const std::shared_ptr &block, - const CBlockIndex *pindex, - const std::vector &txnConflicted) {} + virtual void BlockConnected(const std::shared_ptr &block, + const CBlockIndex *pindex) {} /** * Notifies listeners of a block being disconnected * @@ -218,10 +216,8 @@ bool fInitialDownload); void TransactionAddedToMempool(const CTransactionRef &); void TransactionRemovedFromMempool(const CTransactionRef &); - void - BlockConnected(const std::shared_ptr &, - const CBlockIndex *pindex, - const std::shared_ptr> &); + void BlockConnected(const std::shared_ptr &, + const CBlockIndex *pindex); void BlockDisconnected(const std::shared_ptr &, const CBlockIndex *pindex); void ChainStateFlushed(const CBlockLocator &); diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp --- a/src/validationinterface.cpp +++ b/src/validationinterface.cpp @@ -223,12 +223,11 @@ ptx->GetHash().ToString()); } -void CMainSignals::BlockConnected( - const std::shared_ptr &pblock, const CBlockIndex *pindex, - const std::shared_ptr> &pvtxConflicted) { - auto event = [pblock, pindex, pvtxConflicted, this] { +void CMainSignals::BlockConnected(const std::shared_ptr &pblock, + const CBlockIndex *pindex) { + auto event = [pblock, pindex, this] { m_internals->Iterate([&](CValidationInterface &callbacks) { - callbacks.BlockConnected(pblock, pindex, *pvtxConflicted); + callbacks.BlockConnected(pblock, pindex); }); }; ENQUEUE_AND_LOG_EVENT(event, "%s: block hash=%s block height=%d", __func__, diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1048,9 +1048,7 @@ bool AddToWallet(const CWalletTx &wtxIn, bool fFlushOnClose = true); void LoadToWallet(CWalletTx &wtxIn) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); void transactionAddedToMempool(const CTransactionRef &tx) override; - void blockConnected(const CBlock &block, - const std::vector &vtxConflicted, - int height) override; + void blockConnected(const CBlock &block, int height) override; void blockDisconnected(const CBlock &block, int height) override; void updatedBlockTip() override; int64_t RescanFromTime(int64_t startTime, diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1213,9 +1213,7 @@ } } -void CWallet::blockConnected(const CBlock &block, - const std::vector &vtxConflicted, - int height) { +void CWallet::blockConnected(const CBlock &block, int height) { const BlockHash &block_hash = block.GetHash(); LOCK(cs_wallet); diff --git a/src/zmq/zmqnotificationinterface.h b/src/zmq/zmqnotificationinterface.h --- a/src/zmq/zmqnotificationinterface.h +++ b/src/zmq/zmqnotificationinterface.h @@ -26,10 +26,8 @@ // CValidationInterface void TransactionAddedToMempool(const CTransactionRef &tx) override; - void - BlockConnected(const std::shared_ptr &pblock, - const CBlockIndex *pindexConnected, - const std::vector &vtxConflicted) override; + void BlockConnected(const std::shared_ptr &pblock, + const CBlockIndex *pindexConnected) override; void BlockDisconnected(const std::shared_ptr &pblock, const CBlockIndex *pindexDisconnected) override; void UpdatedBlockTip(const CBlockIndex *pindexNew, diff --git a/src/zmq/zmqnotificationinterface.cpp b/src/zmq/zmqnotificationinterface.cpp --- a/src/zmq/zmqnotificationinterface.cpp +++ b/src/zmq/zmqnotificationinterface.cpp @@ -168,8 +168,7 @@ void CZMQNotificationInterface::BlockConnected( const std::shared_ptr &pblock, - const CBlockIndex *pindexConnected, - const std::vector &vtxConflicted) { + const CBlockIndex *pindexConnected) { for (const CTransactionRef &ptx : pblock->vtx) { // Do a normal notify for each transaction added in the block TransactionAddedToMempool(ptx);