mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-11 21:20:39 +02:00
test: expose missing index crash checkpoint
`index_unclean_shutdown` previously checked only that each index could reopen and start background sync after the simulated crash. An empty index at height 0 satisfies both checks, so the test could pass without preserving any pre-crash checkpoint. Assert the current reopened height before background sync to make the false positive explicit.
This commit is contained in:
@@ -145,6 +145,7 @@ BOOST_FIXTURE_TEST_CASE(index_unclean_shutdown, TestChain100Setup)
|
||||
auto index{make_index(m_node)};
|
||||
BOOST_REQUIRE(index->Init());
|
||||
// Make sure the index can be loaded.
|
||||
BOOST_CHECK_EQUAL(index->GetSummary().best_block_height, 0); // TODO: Establish and reload a pre-crash commit
|
||||
BOOST_REQUIRE(index->StartBackgroundSync());
|
||||
index->Stop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user