Skip to content

Commit 795fe6a

Browse files
fanquakePastaPastaPasta
authored andcommitted
Merge 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 bitcoin#9037. ACKs for top commit: lsilva01: Tested ACK bitcoin@f036dfb on Ubuntu 20.04. theStack: Code-review ACK f036dfb Tree-SHA512: 98145d9596b4ae1f354cfa561be1a54c6b8057c920e0ac3d4c1d42c9326b2dad2d44320f4171bb701d97088b216760cca8017b84c8b5dcd2b1dc8f158f28066d
1 parent c338cd6 commit 795fe6a

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
@@ -544,12 +544,12 @@ class CAddrMan
544544
}
545545

546546
//! Mark an entry as accessible.
547-
void Good(const CService &addr, bool test_before_evict = true, int64_t nTime = GetAdjustedTime())
547+
void Good(const CService &addr, int64_t nTime = GetAdjustedTime())
548548
EXCLUSIVE_LOCKS_REQUIRED(!cs)
549549
{
550550
LOCK(cs);
551551
Check();
552-
Good_(addr, test_before_evict, nTime);
552+
Good_(addr, /* test_before_evict */ true, nTime);
553553
Check();
554554
}
555555

src/test/addrman_tests.cpp

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

8383
bool count_failure = false;
8484
int64_t nLastTry = GetAdjustedTime()-61;

src/test/fuzz/addrman.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ FUZZ_TARGET_INIT(addrman, initialize_addrman)
100100
[&] {
101101
const std::optional<CService> opt_service = ConsumeDeserializable<CService>(fuzzed_data_provider);
102102
if (opt_service) {
103-
addr_man.Good(*opt_service, fuzzed_data_provider.ConsumeBool(), ConsumeTime(fuzzed_data_provider));
103+
addr_man.Good(*opt_service, ConsumeTime(fuzzed_data_provider));
104104
}
105105
},
106106
[&] {

0 commit comments

Comments
 (0)