From 5aa15df60c49aacd3b3dafe13a4ceded9cec07cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rinc?= Date: Sat, 22 Aug 2026 20:03:05 -0700 Subject: [PATCH] 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. --- src/test/baseindex_tests.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/baseindex_tests.cpp b/src/test/baseindex_tests.cpp index 553b07ee7d8..96f41ae118b 100644 --- a/src/test/baseindex_tests.cpp +++ b/src/test/baseindex_tests.cpp @@ -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(); }