From 1fb7b2c59505a6b9768789f6caad215a0a22ef16 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Thu, 17 Sep 2020 15:46:29 -0400 Subject: [PATCH] validation: Use *this in CChainState::InvalidateBlock --- src/validation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 921468c1ef9..eb6ce32b06e 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -3031,7 +3031,8 @@ bool CChainState::InvalidateBlock(BlockValidationState& state, const CChainParam // transactions back to the mempool if disconnecting was successful, // and we're not doing a very deep invalidation (in which case // keeping the mempool up to date is probably futile anyway). - UpdateMempoolForReorg(::ChainstateActive(), m_mempool, disconnectpool, /* fAddToMempool = */ (++disconnected <= 10) && ret); + assert(std::addressof(::ChainstateActive()) == std::addressof(*this)); + UpdateMempoolForReorg(*this, m_mempool, disconnectpool, /* fAddToMempool = */ (++disconnected <= 10) && ret); if (!ret) return false; assert(invalid_walk_tip->pprev == m_chain.Tip());