diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-01-23 19:39:30 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-01-23 20:04:37 +0100 |
commit | fad3d7625aa1c2b6c343946e709e87e7168f9d9d (patch) | |
tree | 9a6492606d0413e8d6d5089a12d8d0f280e35f58 /src/test/fuzz/process_message.cpp | |
parent | fa99e33aebed0109630474e11183b0726b410c2e (diff) |
fuzz: Avoid initializing version to less than MIN_PEER_PROTO_VERSION
Diffstat (limited to 'src/test/fuzz/process_message.cpp')
-rw-r--r-- | src/test/fuzz/process_message.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/fuzz/process_message.cpp b/src/test/fuzz/process_message.cpp index 5d6a33d7c2..e7cc0f5297 100644 --- a/src/test/fuzz/process_message.cpp +++ b/src/test/fuzz/process_message.cpp @@ -60,10 +60,12 @@ void fuzz_target(const std::vector<uint8_t>& buffer, const std::string& LIMIT_TO return; } CNode& p2p_node = *ConsumeNodeAsUniquePtr(fuzzed_data_provider).release(); - FillNode(fuzzed_data_provider, p2p_node); - p2p_node.fSuccessfullyConnected = true; + + const bool successfully_connected{true}; + p2p_node.fSuccessfullyConnected = successfully_connected; connman.AddTestNode(p2p_node); g_setup->m_node.peerman->InitializeNode(&p2p_node); + FillNode(fuzzed_data_provider, p2p_node, /* init_version */ successfully_connected); const auto mock_time = ConsumeTime(fuzzed_data_provider); SetMockTime(mock_time); |