mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 06:49:38 -04:00
fuzz: Move global node id counter along with other global state
The global m_headers_presync_stats is not reset in ResetAndInitialize. This may lead to non-determinism. Fix it by incrementing the global node id counter instead. Without this patch, the tool would report a diff: cargo run --manifest-path ./contrib/devtools/deterministic-fuzz-coverage/Cargo.toml -- $PWD/bld-cmake/ $PWD/../qa-assets/fuzz_corpora/ p2p_headers_presync 32 ... 2587| 3.73k| if (best_it == m_headers_presync_stats.end()) { ------------------ - | Branch (2587:17): [True: 80, False: 3.65k] + | Branch (2587:17): [True: 73, False: 3.66k] ------------------ ...
This commit is contained in:
parent
fa98455e4b
commit
faf2d512c5
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ void HeadersSyncSetup::ResetAndInitialize()
|
|||
auto& connman = static_cast<ConnmanTestMsg&>(*m_node.connman);
|
||||
connman.StopNodes();
|
||||
|
||||
NodeId id{0};
|
||||
static NodeId id{0};
|
||||
std::vector<ConnectionType> conn_types = {
|
||||
ConnectionType::OUTBOUND_FULL_RELAY,
|
||||
ConnectionType::BLOCK_RELAY,
|
||||
|
|
Loading…
Add table
Reference in a new issue