p2p: replace full outbound peers that don't support tx relay (take 2) #36372

pull fjahr wants to merge 4 commits into bitcoin:master from fjahr:2026-09-pr28538-pickup changing 8 files +196 −17
  1. fjahr commented at 5:19 PM on September 28, 2026: contributor

    Picks up #28538

    Outbound-full-relay slots should be used by peers that actually relay transactions, besides #28538 see #16418 and #28371 for the motivation. So try to replace peers that are not relaying txs with peers that do.

    The approach differs from the original PR in a few details in response to some of the review comments there:

    Nothing is changed in -blocksonly mode or during IBD. The rename commit and the functional test are taken from the original PR with some changes to match the new behavior.

  2. refactor: rename ForEachNode and remove duplicate checks
    Rename ForEachNode to ForEachFullyConnectedNode because it
    has an inbuilt check that only executes the passed function
    for fully connected nodes (i.e. if fSuccessfullyConnected is set
    and fDisconnect isn't).
    
    This means callers don't need to need to worry about that, so remove
    those duplicate checks and related comments.
    7ed4cbe6c6
  3. p2p: Don't protect outbound peers not participating in tx relay
    Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
    9798b32508
  4. p2p: Replace outbound peers not participating in tx relay
    Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
    8ac7e7897e
  5. DrahtBot added the label P2P on Sep 28, 2026
  6. DrahtBot commented at 5:19 PM on September 28, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/36372.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    Concept ACK mzumsande

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  7. DrahtBot added the label CI failed on Sep 28, 2026
  8. test: add test for interaction with -blocksonly peers
    Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
    07e58de168
  9. fjahr force-pushed on Sep 28, 2026
  10. DrahtBot removed the label CI failed on Sep 28, 2026
  11. mzumsande commented at 9:16 PM on September 28, 2026: contributor

    Concept ACK, thanks for picking this up!


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-09-28 23:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me