Skip to content

Commit faf4c1b

Browse files
author
MarcoFalke
committed
fuzz: Disable unused validation interface and scheduler in p2p_headers_presync
This may also avoid non-determinism in the scheduler thread.
1 parent fafaca6 commit faf4c1b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/test/fuzz/p2p_headers_presync.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,12 @@ HeadersSyncSetup* g_testing_setup;
150150

151151
void initialize()
152152
{
153-
static auto setup = MakeNoLogFileContext<HeadersSyncSetup>(ChainType::MAIN);
153+
static auto setup{
154+
MakeNoLogFileContext<HeadersSyncSetup>(ChainType::MAIN,
155+
{
156+
.setup_validation_interface = false,
157+
}),
158+
};
154159
g_testing_setup = setup.get();
155160
}
156161
} // namespace
@@ -236,6 +241,4 @@ FUZZ_TARGET(p2p_headers_presync, .init = initialize)
236241
// to meet the anti-DoS work threshold. So, if at any point the block index grew in size, then there's a bug
237242
// in the headers pre-sync logic.
238243
assert(WITH_LOCK(cs_main, return chainman.m_blockman.m_block_index.size()) == original_index_size);
239-
240-
g_testing_setup->m_node.validation_signals->SyncWithValidationInterfaceQueue();
241244
}

0 commit comments

Comments
 (0)