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:
Lőrinc
2026-08-22 20:03:05 -07:00
parent 58a7869f86
commit 5aa15df60c

View File

@@ -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();
}