mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-17 17:02:43 +00:00
Merge bitcoin/bitcoin#34830: fuzz: set fSuccessfullyConnected in connman harness
685a44c60122a8e9bf69076bdab117dd55469373 fuzz: 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 ACK 685a44c60122a8e9bf69076bdab117dd55469373
sedited:
ACK 685a44c60122a8e9bf69076bdab117dd55469373
marcofleon:
ACK 685a44c60122a8e9bf69076bdab117dd55469373
Tree-SHA512: 2c696b8674cb465f468642b5fd37a467bc34dcbf61dc901d784fd2fe0dd13ced5cd6bd9873bcce0f8e60e25d450052e9a562ece08abeb2ab6472e584dba65c40
This commit is contained in:
commit
04480c2558
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user