mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-06 21:57:54 +02:00
Merge bitcoin/bitcoin#34830: fuzz: set fSuccessfullyConnected in connman harness
685a44c601fuzz: set fSuccessfullyConnected in connman harness (frankomosh) Pull request description: The connman fuzz harness never sets `fSuccessfullyConnected=true` on nodes added through `AddTestNode()`. `NodeFullyConnected()` gates `ForEachNode()` on that flag, making its callback unreachable in the current harness. Set `fSuccessfullyConnected=true` before `AddTestNode()` to simulate a node that has completed the version handshake. ACKs for top commit: maflcko: lgtm ACK685a44c601sedited: ACK685a44c601marcofleon: ACK685a44c601Tree-SHA512: 2c696b8674cb465f468642b5fd37a467bc34dcbf61dc901d784fd2fe0dd13ced5cd6bd9873bcce0f8e60e25d450052e9a562ece08abeb2ab6472e584dba65c40
This commit is contained in:
@@ -89,6 +89,8 @@ FUZZ_TARGET(connman, .init = initialize_connman)
|
||||
|
||||
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 100) {
|
||||
CNode& p2p_node{*ConsumeNodeAsUniquePtr(fuzzed_data_provider).release()};
|
||||
// Simulate post-handshake state.
|
||||
p2p_node.fSuccessfullyConnected = true;
|
||||
connman.AddTestNode(p2p_node);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user