diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-12-28 21:53:19 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-01-02 15:05:21 +0100 |
commit | fa121f058fdc5f09dd11678480f551246cb3c5e2 (patch) | |
tree | 30d6e4a49289af36598152a1cf319f8d94cf2663 /src/test/fuzz/process_messages.cpp | |
parent | 6f97172b4296395f93648c86ea4c9fc519bcb488 (diff) |
fuzz: Use ConsumeNode in process_messages target
Diffstat (limited to 'src/test/fuzz/process_messages.cpp')
-rw-r--r-- | src/test/fuzz/process_messages.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test/fuzz/process_messages.cpp b/src/test/fuzz/process_messages.cpp index 0ff95ea1ae..fcfa623508 100644 --- a/src/test/fuzz/process_messages.cpp +++ b/src/test/fuzz/process_messages.cpp @@ -47,9 +47,7 @@ FUZZ_TARGET_INIT(process_messages, initialize_process_messages) const auto num_peers_to_add = fuzzed_data_provider.ConsumeIntegralInRange(1, 3); for (int i = 0; i < num_peers_to_add; ++i) { - const ServiceFlags service_flags = ServiceFlags(fuzzed_data_provider.ConsumeIntegral<uint64_t>()); - const ConnectionType conn_type = fuzzed_data_provider.PickValueInArray({ConnectionType::INBOUND, ConnectionType::OUTBOUND_FULL_RELAY, ConnectionType::MANUAL, ConnectionType::FEELER, ConnectionType::BLOCK_RELAY, ConnectionType::ADDR_FETCH}); - peers.push_back(MakeUnique<CNode>(i, service_flags, INVALID_SOCKET, CAddress{CService{in_addr{0x0100007f}, 7777}, NODE_NETWORK}, 0, 0, CAddress{}, std::string{}, conn_type).release()); + peers.push_back(ConsumeNodeAsUniquePtr(fuzzed_data_provider, i).release()); CNode& p2p_node = *peers.back(); p2p_node.fSuccessfullyConnected = true; |