test: check MIN_PEER_PROTO_VERSION peers are not disconnected #36522

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:test-min-peer-proto-version changing 1 files +28 −0
  1. instagibbs commented at 6:29 AM on October 14, 2026: member

    Kills mutant https://bitcoincore.space/src/net_processing.cpp#3442

    diff --git a/src/net_processing.cpp b/src/net_processing.cpp
    index 61b8a4ecd8..73c91a5bd6 100644
    --- a/src/net_processing.cpp
    +++ b/src/net_processing.cpp
    @@ -3647,7 +3647,7 @@ void PeerManagerImpl::ProcessMessage(Peer& peer, CNode& pfrom, const std::string
                 return;
             }
     
    -        if (nVersion < MIN_PEER_PROTO_VERSION) {
    +        if (nVersion <= MIN_PEER_PROTO_VERSION) {
                 // disconnect from peers older than this proto version
                 LogDebug(BCLog::NET, "peer using obsolete version %i, %s", nVersion, pfrom.DisconnectMsg());
                 pfrom.fDisconnect = true;
    
  2. test: check MIN_PEER_PROTO_VERSION peers are not disconnected 5b07c48b83
  3. DrahtBot added the label Tests on Oct 14, 2026
  4. DrahtBot commented at 6:29 AM on October 14, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    Type Reviewers
    ACK maflcko, brunoerg

    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-->

  5. maflcko commented at 7:27 AM on October 14, 2026: member

    lgtm ACK 5b07c48b8387f387530a90ce5b4a1224b6703aa3

    For reference, in case the third-party site goes down, the mutant diff was:

    diff --git a/src/net_processing.cpp b/src/net_processing.cpp
    index 61b8a4ecd8..73c91a5bd6 100644
    --- a/src/net_processing.cpp
    +++ b/src/net_processing.cpp
    @@ -3647,7 +3647,7 @@ void PeerManagerImpl::ProcessMessage(Peer& peer, CNode& pfrom, const std::string
                 return;
             }
     
    -        if (nVersion < MIN_PEER_PROTO_VERSION) {
    +        if (nVersion <= MIN_PEER_PROTO_VERSION) {
                 // disconnect from peers older than this proto version
                 LogDebug(BCLog::NET, "peer using obsolete version %i, %s", nVersion, pfrom.DisconnectMsg());
                 pfrom.fDisconnect = true;
    
  6. instagibbs commented at 8:01 AM on October 14, 2026: member

    @maflcko copied into OP thanks

  7. brunoerg approved
  8. brunoerg commented at 12:42 AM on October 15, 2026: contributor

    ACK 5b07c48b8387f387530a90ce5b4a1224b6703aa3

    Verified it kills the mutant - see: https://mutanthub.space/mutants/1028

    Please, check https://mutanthub.space/projects/bitcoin/bitcoin instead of https://bitcoincore.space next time (I’m going to disable it in favor of MutantHub).

  9. fanquake merged this on Oct 16, 2026
  10. fanquake closed this on Oct 16, 2026


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-10-24 07:51 UTC

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