Commit 25dbe4b
committed
Merge bitcoin/bitcoin#33533: test: addrman: check isTerrible when time is more than 10min in the future
8e47ed6 test: addrman: check isTerrible when time is more than 10min in the future (brunoerg)
Pull request description:
This PR adds test coverage to kill the following mutant (https://corecheck.dev/mutation/src/addrman.cpp#L76):
```diff
diff --git a/src/addrman.cpp b/src/addrman.cpp
index 9c3a24d..0ffd349315 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -73,7 +73,7 @@ bool AddrInfo::IsTerrible(NodeSeconds now) const
}
if (nTime > now + 10min) { // came in a flying DeLorean
- return true;
+ return false;
}
```
When the `nTime` is set 10 minutes in the future the addr should be marked as terrible.
ACKs for top commit:
Crypt-iQ:
crACK 8e47ed6
danielabrozzoni:
tACK 8e47ed6
marcofleon:
Nice, code review ACK 8e47ed6
Tree-SHA512: b53b3aa234a73ec7808cb1555916ac64dd707f230ec290a1712493ece8e274a060e16d862b31df0f744804ebd3c0c2825c49becb7d3040cc358e48c4002524cb1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
462 | 468 | | |
463 | 469 | | |
464 | 470 | | |
465 | | - | |
| 471 | + | |
466 | 472 | | |
467 | 473 | | |
468 | 474 | | |
| |||
0 commit comments