mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-15 00:14:08 +02:00
6202acd284test: addrman: successive failures in the last week for IsTerrible (brunoerg)f611d3bdafrefactor: addrman: move consts to .h (brunoerg) Pull request description: 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): ```diff diff --git a/src/addrman.cpp b/src/addrman.cpp index e3981e6a40..f8045491c1 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -65,7 +65,7 @@ bool AddrInfo::IsTerrible(NodeSeconds now) const } if (now - m_last_success > ADDRMAN_MIN_FAIL && nAttempts >= ADDRMAN_MAX_FAILURES) { // N successive failures in the last week - return true; + return false; } return false; ``` ACKs for top commit: frankomosh: re-ACK6202acd284naiyoma: tACK6202acd284danielabrozzoni: tACK6202acd284sedited: ACK6202acd284Tree-SHA512: b4736ef91b75ba4c060dc18a2b796aee94d0d8be5ca58b9b873156248cd0dc6910595595e0f56d75bffff4f94c035319ac8428f7d79f07fe685bdba27a188829
43 KiB
43 KiB