Changeset View
Changeset View
Standalone View
Standalone View
src/test/validation_chainstate_tests.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | BOOST_FIXTURE_TEST_CASE(chainstate_update_tip, TestChain100Setup) { | ||||
mineBlocks(10); | mineBlocks(10); | ||||
// After adding some blocks to the tip, best block should have changed. | // After adding some blocks to the tip, best block should have changed. | ||||
BOOST_CHECK(::g_best_block != curr_tip); | BOOST_CHECK(::g_best_block != curr_tip); | ||||
BOOST_REQUIRE(CreateAndActivateUTXOSnapshot(m_node, m_path_root)); | BOOST_REQUIRE(CreateAndActivateUTXOSnapshot(m_node, m_path_root)); | ||||
// Ensure our active chain is the snapshot chainstate. | // Ensure our active chain is the snapshot chainstate. | ||||
BOOST_CHECK(chainman.IsSnapshotActive()); | BOOST_CHECK(WITH_LOCK(::cs_main, return chainman.IsSnapshotActive())); | ||||
curr_tip = BlockHash{::g_best_block}; | curr_tip = BlockHash{::g_best_block}; | ||||
// Mine a new block on top of the activated snapshot chainstate. | // Mine a new block on top of the activated snapshot chainstate. | ||||
// Defined in TestChain100Setup. | // Defined in TestChain100Setup. | ||||
mineBlocks(1); | mineBlocks(1); | ||||
// After adding some blocks to the snapshot tip, best block should have | // After adding some blocks to the snapshot tip, best block should have | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |