mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-06 14:19:59 -05:00
fuzz: set nMaxOutboundLimit
in connman target
This commit is contained in:
parent
65c05db660
commit
e5b9ee0221
1 changed files with 5 additions and 1 deletions
|
@ -38,6 +38,10 @@ FUZZ_TARGET(connman, .init = initialize_connman)
|
||||||
*g_setup->m_node.netgroupman,
|
*g_setup->m_node.netgroupman,
|
||||||
Params(),
|
Params(),
|
||||||
fuzzed_data_provider.ConsumeBool()};
|
fuzzed_data_provider.ConsumeBool()};
|
||||||
|
|
||||||
|
const uint64_t max_outbound_limit{fuzzed_data_provider.ConsumeIntegral<uint64_t>()};
|
||||||
|
connman.Init({ .nMaxOutboundLimit = max_outbound_limit });
|
||||||
|
|
||||||
CNetAddr random_netaddr;
|
CNetAddr random_netaddr;
|
||||||
CNode random_node = ConsumeNode(fuzzed_data_provider);
|
CNode random_node = ConsumeNode(fuzzed_data_provider);
|
||||||
CSubNet random_subnet;
|
CSubNet random_subnet;
|
||||||
|
@ -125,7 +129,7 @@ FUZZ_TARGET(connman, .init = initialize_connman)
|
||||||
(void)connman.GetAddedNodeInfo(fuzzed_data_provider.ConsumeBool());
|
(void)connman.GetAddedNodeInfo(fuzzed_data_provider.ConsumeBool());
|
||||||
(void)connman.GetExtraFullOutboundCount();
|
(void)connman.GetExtraFullOutboundCount();
|
||||||
(void)connman.GetLocalServices();
|
(void)connman.GetLocalServices();
|
||||||
(void)connman.GetMaxOutboundTarget();
|
assert(connman.GetMaxOutboundTarget() == max_outbound_limit);
|
||||||
(void)connman.GetMaxOutboundTimeframe();
|
(void)connman.GetMaxOutboundTimeframe();
|
||||||
(void)connman.GetMaxOutboundTimeLeftInCycle();
|
(void)connman.GetMaxOutboundTimeLeftInCycle();
|
||||||
(void)connman.GetNetworkActive();
|
(void)connman.GetNetworkActive();
|
||||||
|
|
Loading…
Add table
Reference in a new issue