aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2021-01-29 10:29:44 +0000
committerJohn Newbery <john@johnnewbery.com>2021-01-29 12:39:55 +0000
commit4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b (patch)
treed03f2f12741f2ef0365ed216384de5efad9b6be7 /src/addrman.h
parent436292367c1d737cf73bd985293539500d1206f5 (diff)
downloadbitcoin-4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b.tar.xz
[addrman] Don't repeat "Bucketing method was updated" log multiple times
Thanks to Vasil Dimov <vd@FreeBSD.org> for these suggestions
Diffstat (limited to 'src/addrman.h')
-rw-r--r--src/addrman.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/addrman.h b/src/addrman.h
index 9ca0a989c0..92a5570953 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -528,6 +528,10 @@ public:
const bool restore_bucketing{nUBuckets == ADDRMAN_NEW_BUCKET_COUNT &&
serialized_asmap_checksum == supplied_asmap_checksum};
+ if (!restore_bucketing) {
+ LogPrint(BCLog::ADDRMAN, "Bucketing method was updated, re-bucketing addrman entries from disk\n");
+ }
+
for (auto bucket_entry : bucket_entries) {
int bucket{bucket_entry.first};
const int entry_index{bucket_entry.second};
@@ -546,7 +550,6 @@ public:
} else {
// In case the new table data cannot be used (bucket count wrong or new asmap),
// try to give them a reference based on their primary source address.
- LogPrint(BCLog::ADDRMAN, "Bucketing method was updated, re-bucketing addrman entries from disk\n");
bucket = info.GetNewBucket(nKey, m_asmap);
bucket_position = info.GetBucketPosition(nKey, true, bucket);
if (vvNew[bucket][bucket_position] == -1) {