From faf4c1b6fc330885ddf84b643838d1e301aaeab2 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 9 Apr 2025 11:15:09 +0200 Subject: [PATCH] fuzz: Disable unused validation interface and scheduler in p2p_headers_presync This may also avoid non-determinism in the scheduler thread. --- src/test/fuzz/p2p_headers_presync.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/test/fuzz/p2p_headers_presync.cpp b/src/test/fuzz/p2p_headers_presync.cpp index 93575877407..3a7146df8fe 100644 --- a/src/test/fuzz/p2p_headers_presync.cpp +++ b/src/test/fuzz/p2p_headers_presync.cpp @@ -150,7 +150,12 @@ HeadersSyncSetup* g_testing_setup; void initialize() { - static auto setup = MakeNoLogFileContext(ChainType::MAIN); + static auto setup{ + MakeNoLogFileContext(ChainType::MAIN, + { + .setup_validation_interface = false, + }), + }; g_testing_setup = setup.get(); } } // namespace @@ -236,6 +241,4 @@ FUZZ_TARGET(p2p_headers_presync, .init = initialize) // to meet the anti-DoS work threshold. So, if at any point the block index grew in size, then there's a bug // in the headers pre-sync logic. assert(WITH_LOCK(cs_main, return chainman.m_blockman.m_block_index.size()) == original_index_size); - - g_testing_setup->m_node.validation_signals->SyncWithValidationInterfaceQueue(); }