The in_avail alias is confusing (see commit message), so remove it. Also extract the ProcessPong() helper, as the only place that called in_avail.
refactor: Remove confusing DataStream::in_avail() alias #35148
pull maflcko wants to merge 2 commits into bitcoin:master from maflcko:2603-net-less-GetTime changing 2 files +63 −60-
maflcko commented at 10:53 AM on April 24, 2026: member
-
fa5ab0220e
move-only: Extract ProcessPong() helper
This commit can be reviewed with the git options: --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
-
fa204100e1
streams: Remove confusing DataStream::in_avail()
The alias of the size() method is confusing, because: * It claims to be part of the Bitcoin Core stream subset (streams interface), but this is not used by any other stream interface. Mostly the `write(std::span)` and `read(std::span)` define the stream interface. * It casts the size_t to i32, but the only place that calls the function casts that back to size_t. * Providing this alias for size() without a proper reason is confusing. Fix all issues by removing it and using the size() method.
- DrahtBot renamed this:
refactor: Remove confusing DataStream::in_avail() alias
refactor: Remove confusing DataStream::in_avail() alias
on Apr 24, 2026 - DrahtBot added the label Refactoring on Apr 24, 2026
-
DrahtBot commented at 10:53 AM on April 24, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #35054 (p2p: UTXO set sharing by fjahr)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
l0rinc commented at 7:31 PM on April 24, 2026: contributor
code review ACK fa204100e1456b14978071064112fce2acc527a6
While it's not immediately obvious why the extraction was needed, it seems like a reasonable change. Redid the change locally, played a bit with various
EXCLUSIVE_LOCKS_REQUIREDvalues, but the current implementation seems fine. - sedited approved
-
sedited commented at 8:15 AM on April 25, 2026: contributor
ACK fa204100e1456b14978071064112fce2acc527a6
- sedited merged this on Apr 25, 2026
- sedited closed this on Apr 25, 2026
- sedited referenced this in commit 75f2bf1011 on Apr 25, 2026
- maflcko deleted the branch on May 6, 2026