Skip to content

Commit 1fb7b2c

Browse files
committed
validation: Use *this in CChainState::InvalidateBlock
1 parent 8cdb2f7 commit 1fb7b2c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/validation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3031,7 +3031,8 @@ bool CChainState::InvalidateBlock(BlockValidationState& state, const CChainParam
30313031
// transactions back to the mempool if disconnecting was successful,
30323032
// and we're not doing a very deep invalidation (in which case
30333033
// keeping the mempool up to date is probably futile anyway).
3034-
UpdateMempoolForReorg(::ChainstateActive(), m_mempool, disconnectpool, /* fAddToMempool = */ (++disconnected <= 10) && ret);
3034+
assert(std::addressof(::ChainstateActive()) == std::addressof(*this));
3035+
UpdateMempoolForReorg(*this, m_mempool, disconnectpool, /* fAddToMempool = */ (++disconnected <= 10) && ret);
30353036
if (!ret) return false;
30363037
assert(invalid_walk_tip->pprev == m_chain.Tip());
30373038

0 commit comments

Comments
 (0)