mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-13 03:30:42 +02:00
fuzz: Disable unused validation interface and scheduler in p2p_headers_presync
This may also avoid non-determinism in the scheduler thread.
This commit is contained in:
parent
fafaca6cbc
commit
faf4c1b6fc
@ -150,7 +150,12 @@ HeadersSyncSetup* g_testing_setup;
|
|||||||
|
|
||||||
void initialize()
|
void initialize()
|
||||||
{
|
{
|
||||||
static auto setup = MakeNoLogFileContext<HeadersSyncSetup>(ChainType::MAIN);
|
static auto setup{
|
||||||
|
MakeNoLogFileContext<HeadersSyncSetup>(ChainType::MAIN,
|
||||||
|
{
|
||||||
|
.setup_validation_interface = false,
|
||||||
|
}),
|
||||||
|
};
|
||||||
g_testing_setup = setup.get();
|
g_testing_setup = setup.get();
|
||||||
}
|
}
|
||||||
} // namespace
|
} // 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
|
// 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.
|
// in the headers pre-sync logic.
|
||||||
assert(WITH_LOCK(cs_main, return chainman.m_blockman.m_block_index.size()) == original_index_size);
|
assert(WITH_LOCK(cs_main, return chainman.m_blockman.m_block_index.size()) == original_index_size);
|
||||||
|
|
||||||
g_testing_setup->m_node.validation_signals->SyncWithValidationInterfaceQueue();
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user