Skip to content

Commit 4676a4f

Browse files
committed
[addrman] Don't repeat "Bucketing method was updated" log multiple times
Thanks to Vasil Dimov <[email protected]> for these suggestions
1 parent 4362923 commit 4676a4f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/addrman.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,10 @@ friend class CAddrManTest;
528528
const bool restore_bucketing{nUBuckets == ADDRMAN_NEW_BUCKET_COUNT &&
529529
serialized_asmap_checksum == supplied_asmap_checksum};
530530

531+
if (!restore_bucketing) {
532+
LogPrint(BCLog::ADDRMAN, "Bucketing method was updated, re-bucketing addrman entries from disk\n");
533+
}
534+
531535
for (auto bucket_entry : bucket_entries) {
532536
int bucket{bucket_entry.first};
533537
const int entry_index{bucket_entry.second};
@@ -546,7 +550,6 @@ friend class CAddrManTest;
546550
} else {
547551
// In case the new table data cannot be used (bucket count wrong or new asmap),
548552
// try to give them a reference based on their primary source address.
549-
LogPrint(BCLog::ADDRMAN, "Bucketing method was updated, re-bucketing addrman entries from disk\n");
550553
bucket = info.GetNewBucket(nKey, m_asmap);
551554
bucket_position = info.GetBucketPosition(nKey, true, bucket);
552555
if (vvNew[bucket][bucket_position] == -1) {

0 commit comments

Comments
 (0)