Merge bitcoin/bitcoin#26561: fuzz: Move-only net utils #1236
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backports bitcoin#26561
Original commit: 93cae70
Summary
This is a move-only refactoring commit that moves net-related fuzz utilities from
src/test/fuzz/util.cppandsrc/test/fuzz/util.htosrc/test/fuzz/util/net.cppandsrc/test/fuzz/util/net.h.Changes
FuzzedSockclass and its implementations toutil/net.cpp/util/net.hConsumeAddress,ConsumeSubNet,ConsumeService,ConsumeNode,FillNode) toutil/net.cpp/util/net.h#include <test/fuzz/util/net.h>to fuzz tests that use these utilities#include <util/check.h>topow.cppfuzz test as a side effect of the refactoringDash-specific adaptations
FuzzedSockmethod signatures to match Dash'sSockclass API:IsSelectable(bool is_select)instead ofIsSelectable()Wait(..., SocketEventsParams event_params, ...)instead ofWait(...)WaitMany(..., SocketEventsParams event_params)instead ofWaitMany(...)Summary by CodeRabbit
Refactor
Tests
✏️ Tip: You can customize this high-level summary in your review settings.