mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
[addrman] Don't repeat "Bucketing method was updated" log multiple times
Thanks to Vasil Dimov <vd@FreeBSD.org> for these suggestions
This commit is contained in:
parent
436292367c
commit
4676a4fb5b
1 changed files with 4 additions and 1 deletions
|
@ -528,6 +528,10 @@ public:
|
||||||
const bool restore_bucketing{nUBuckets == ADDRMAN_NEW_BUCKET_COUNT &&
|
const bool restore_bucketing{nUBuckets == ADDRMAN_NEW_BUCKET_COUNT &&
|
||||||
serialized_asmap_checksum == supplied_asmap_checksum};
|
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) {
|
for (auto bucket_entry : bucket_entries) {
|
||||||
int bucket{bucket_entry.first};
|
int bucket{bucket_entry.first};
|
||||||
const int entry_index{bucket_entry.second};
|
const int entry_index{bucket_entry.second};
|
||||||
|
@ -546,7 +550,6 @@ public:
|
||||||
} else {
|
} else {
|
||||||
// In case the new table data cannot be used (bucket count wrong or new asmap),
|
// 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.
|
// 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 = info.GetNewBucket(nKey, m_asmap);
|
||||||
bucket_position = info.GetBucketPosition(nKey, true, bucket);
|
bucket_position = info.GetBucketPosition(nKey, true, bucket);
|
||||||
if (vvNew[bucket][bucket_position] == -1) {
|
if (vvNew[bucket][bucket_position] == -1) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue