test: cover disconnect on private broadcast peer with relay=false #35681

pull brunoerg wants to merge 1 commits into bitcoin:master from brunoerg:2026-07-test-private-broadcast changing 1 files +27 −0
  1. brunoerg commented at 9:33 PM on July 7, 2026: contributor

    Currently, there is no test case to verify the disconnection of a private broadcast connection when the peer does not support transaction relay. This PR addresses it.

    Can be tested with:

    diff --git a/src/net_processing.cpp b/src/net_processing.cpp
    index 27f0a63c55..5d9a8f9c06 100644
    --- a/src/net_processing.cpp
    +++ b/src/net_processing.cpp
    @@ -3741,7 +3741,7 @@ void PeerManagerImpl::ProcessMessage(Peer& peer, CNode& pfrom, const std::string
                 } else {
                     LogDebug(BCLog::PRIVBROADCAST, "Disconnecting: does not support transaction relay (connected in vain), %s",
                              pfrom.LogPeer());
    -                pfrom.fDisconnect = true;
    +                pfrom.fDisconnect = false;
                 }
                 return;
             }
    
  2. test: cover disconnect on private broadcast peer with relay=false f748da22b7
  3. DrahtBot added the label Tests on Jul 7, 2026
  4. DrahtBot commented at 9:33 PM on July 7, 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/35681.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. brunoerg marked this as ready for review on Jul 7, 2026
Contributors
Labels

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-07-09 06:47 UTC