aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2020-10-23 09:34:27 +0100
committerJohn Newbery <john@johnnewbery.com>2021-03-20 10:24:36 +0000
commit1c25adf6d278eb1a1f018986a126d0eb8137e0ee (patch)
treed281bae2edbf480286d1eaa417953b2a4c7b13a1 /src/test/fuzz
parent3530d5d2d851d025b013b2ea79ed39a57cbbafcd (diff)
[net] Construct addrman outside connman
node.context owns the CAddrMan. CConnman holds a reference to the CAddrMan.
Diffstat (limited to 'src/test/fuzz')
-rw-r--r--src/test/fuzz/connman.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/fuzz/connman.cpp b/src/test/fuzz/connman.cpp
index ae77a45e44..7bb5ed9657 100644
--- a/src/test/fuzz/connman.cpp
+++ b/src/test/fuzz/connman.cpp
@@ -25,7 +25,8 @@ FUZZ_TARGET_INIT(connman, initialize_connman)
{
FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
SetMockTime(ConsumeTime(fuzzed_data_provider));
- CConnman connman{fuzzed_data_provider.ConsumeIntegral<uint64_t>(), fuzzed_data_provider.ConsumeIntegral<uint64_t>(), fuzzed_data_provider.ConsumeBool()};
+ CAddrMan addrman;
+ CConnman connman{fuzzed_data_provider.ConsumeIntegral<uint64_t>(), fuzzed_data_provider.ConsumeIntegral<uint64_t>(), addrman, fuzzed_data_provider.ConsumeBool()};
CAddress random_address;
CNetAddr random_netaddr;
CNode random_node = ConsumeNode(fuzzed_data_provider);