Skip to content

Commit 0fffd6c

Browse files
committed
Merge bitcoin/bitcoin#22505: addrman: Remove unused test_before_evict argument from Good()
f036dfb [addrman] Remove unused test_before_evict argument from Good() (John Newbery) Pull request description: This has never been used in the public interface method since it was introduced in #9037. ACKs for top commit: lsilva01: Tested ACK bitcoin/bitcoin@f036dfb on Ubuntu 20.04. theStack: Code-review ACK f036dfb Tree-SHA512: 98145d9596b4ae1f354cfa561be1a54c6b8057c920e0ac3d4c1d42c9326b2dad2d44320f4171bb701d97088b216760cca8017b84c8b5dcd2b1dc8f158f28066d
2 parents bb09ec6 + f036dfb commit 0fffd6c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/addrman.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,12 +536,12 @@ class CAddrMan
536536
}
537537

538538
//! Mark an entry as accessible.
539-
void Good(const CService &addr, bool test_before_evict = true, int64_t nTime = GetAdjustedTime())
539+
void Good(const CService &addr, int64_t nTime = GetAdjustedTime())
540540
EXCLUSIVE_LOCKS_REQUIRED(!cs)
541541
{
542542
LOCK(cs);
543543
Check();
544-
Good_(addr, test_before_evict, nTime);
544+
Good_(addr, /* test_before_evict */ true, nTime);
545545
Check();
546546
}
547547

src/test/addrman_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class CAddrManTest : public CAddrMan
7676
{
7777
int64_t nLastSuccess = 1;
7878
// Set last good connection in the deep past.
79-
Good(addr, true, nLastSuccess);
79+
Good(addr, nLastSuccess);
8080

8181
bool count_failure = false;
8282
int64_t nLastTry = GetAdjustedTime()-61;

src/test/fuzz/addrman.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ FUZZ_TARGET_INIT(addrman, initialize_addrman)
8080
[&] {
8181
const std::optional<CService> opt_service = ConsumeDeserializable<CService>(fuzzed_data_provider);
8282
if (opt_service) {
83-
addr_man.Good(*opt_service, fuzzed_data_provider.ConsumeBool(), ConsumeTime(fuzzed_data_provider));
83+
addr_man.Good(*opt_service, ConsumeTime(fuzzed_data_provider));
8484
}
8585
},
8686
[&] {

0 commit comments

Comments
 (0)