test: addrman: successive failures in the last week for IsTerrible #34602

pull brunoerg wants to merge 2 commits into bitcoin:master from brunoerg:2026-02-test-addrman-isterrible changing 3 files +56 −20
  1. brunoerg commented at 7:14 pm on February 16, 2026: contributor

    This PR adds test coverage for the case that an address is considered terrible if we had N successive failures in the last week.

    It kills the following mutant (https://corecheck.dev/mutation/src/addrman.cpp#L88):

     0diff --git a/src/addrman.cpp b/src/addrman.cpp
     1index e3981e6a40..f8045491c1 100644
     2--- a/src/addrman.cpp
     3+++ b/src/addrman.cpp
     4@@ -65,7 +65,7 @@ bool AddrInfo::IsTerrible(NodeSeconds now) const
     5     }
     6
     7     if (now - m_last_success > ADDRMAN_MIN_FAIL && nAttempts >= ADDRMAN_MAX_FAILURES) { // N successive failures in the last week
     8-        return true;
     9+        return false;
    10     }
    11
    12     return false;
    
  2. refactor: addrman: move consts to .h f611d3bdaf
  3. test: addrman: successive failures in the last week for IsTerrible 7c397597f3
  4. DrahtBot added the label Tests on Feb 16, 2026
  5. DrahtBot commented at 7:15 pm on February 16, 2026: contributor

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

    Reviews

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

    LLM Linter (✨ experimental)

    Possible typos and grammar issues:

    • “How old addresses can maximally be” -> “Maximum age for addresses” [phrase “can maximally be” is awkward and may impede quick comprehension]
    • “… in at least this duration” -> “… within this duration” [phrase “in at least this duration” is unclear; “within this duration” more clearly expresses a time window]

    2026-02-16 19:15:08


brunoerg DrahtBot

Labels
Tests


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-02-17 06:13 UTC

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