Skip to content

Commit

Permalink
QA: bitcoin_test/validation_block_tests: Check sanity of CBlock cache…
Browse files Browse the repository at this point in the history
…, but not behaviour/when it is present
  • Loading branch information
luke-jr committed Mar 13, 2024
1 parent 175df3a commit 1b6d85f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/test/validation_block_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ struct TestSubscriber final : public CValidationInterface {
void UpdatedBlockTip(const CBlockIndex* pindexNew, const CBlockIndex* pindexFork, bool fInitialDownload, const std::shared_ptr<const CBlock>& 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;
}
}
Expand Down

0 comments on commit 1b6d85f

Please sign in to comment.