From a80f42eabd884c8c140694fe0c0169cd9c8d1b7d Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sat, 7 Sep 2019 23:16:59 +0300 Subject: [PATCH] Still pass the disconect block index --- src/validation.cpp | 2 +- src/validationinterface.cpp | 6 +++--- src/validationinterface.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index e9e9a20dc..cc2acd037 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2350,7 +2350,7 @@ bool static DisconnectTip(CValidationState& state, const CChainParams& chainpara UpdateTip(pindexDelete->pprev, chainparams); // Let wallets know transactions went from 1-confirmed to // 0-confirmed or conflicted: - GetMainSignals().BlockDisconnected(pblock); + GetMainSignals().BlockDisconnected(pblock, pindexDelete); return true; } diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp index 542c0cf66..f36a72923 100644 --- a/src/validationinterface.cpp +++ b/src/validationinterface.cpp @@ -18,7 +18,7 @@ struct MainSignalsInstance { boost::signals2::signal UpdatedBlockTip; boost::signals2::signal TransactionAddedToMempool; boost::signals2::signal &, const CBlockIndex *pindex, const std::vector&)> BlockConnected; - boost::signals2::signal &)> BlockDisconnected; + boost::signals2::signal &, const CBlockIndex* pindexDisconnected)> BlockDisconnected; boost::signals2::signal SetBestChain; boost::signals2::signal Inventory; boost::signals2::signal Broadcast; @@ -132,8 +132,8 @@ void CMainSignals::BlockConnected(const std::shared_ptr &pblock, c m_internals->BlockConnected(pblock, pindex, vtxConflicted); } -void CMainSignals::BlockDisconnected(const std::shared_ptr &pblock) { - m_internals->BlockDisconnected(pblock); +void CMainSignals::BlockDisconnected(const std::shared_ptr &pblock, const CBlockIndex* pindexDisconnected) { + m_internals->BlockDisconnected(pblock, pindexDisconnected); } void CMainSignals::SetBestChain(const CBlockLocator &locator) { diff --git a/src/validationinterface.h b/src/validationinterface.h index 89aba7ea9..b56e8e748 100644 --- a/src/validationinterface.h +++ b/src/validationinterface.h @@ -103,7 +103,7 @@ public: void UpdatedBlockTip(const CBlockIndex *, const CBlockIndex *, bool fInitialDownload); void TransactionAddedToMempool(const CTransactionRef &); void BlockConnected(const std::shared_ptr &, const CBlockIndex *pindex, const std::vector &); - void BlockDisconnected(const std::shared_ptr &); + void BlockDisconnected(const std::shared_ptr &, const CBlockIndex* pindexDisconnected); void NotifyTransactionLock(const CTransaction &tx, const llmq::CInstantSendLock& islock); void NotifyChainLock(const CBlockIndex* pindex, const llmq::CChainLockSig& clsig); void NotifyGovernanceVote(const CGovernanceVote &vote);