diff --git a/src/test/validation_block_tests.cpp b/src/test/validation_block_tests.cpp index 961cdc74b1d6df..16366dd0111aef 100644 --- a/src/test/validation_block_tests.cpp +++ b/src/test/validation_block_tests.cpp @@ -41,10 +41,9 @@ struct TestSubscriber final : public CValidationInterface { void UpdatedBlockTip(const CBlockIndex* pindexNew, const CBlockIndex* pindexFork, bool fInitialDownload, const std::shared_ptr& block) override { BOOST_CHECK_EQUAL(m_expected_tip, pindexNew->GetBlockHash()); - if (CValidationInterface::any_use_tip_block_cache) { + if (block) { BOOST_CHECK_EQUAL(m_expected_tip, block->GetHash()); } else { - BOOST_CHECK(!block); CValidationInterface::any_use_tip_block_cache = true; } }