HomePhabricator

log: improve addrman logging

Description

log: improve addrman logging

Summary:

The addrman helper functions GetNewBucket() and GetTriedBucket()

    log into the wrong category (BCLog::NET instead of BCLog::ADDRMAN)
    log too unspecifically - especially GetTriedBucket() gets called from many different places (e.g. Check_(), Serialize()), it seems sufficient to me logging these when moving an address from new to tried. Running a node with -checkaddrman=1and net logging currently results in a lot of repetitive log entries.

This PR moves these log entries to Add_() and Good_() and also adds logging for Select_() (allowing statistics about New/Tried success probabilities), GetAddr_(), ClearNew() and MakeTried().

Backport of core#22839.

Depends on D12338.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D12339

Details

Provenance
Martin Zumsande <mzumsande@gmail.com>Authored on Aug 29 2021, 22:18
FabienCommitted on Oct 21 2022, 08:34
FabienPushed on Oct 21 2022, 08:34
Reviewer
Restricted Project
Differential Revision
D12339: log: improve addrman logging
Parents
rABC04cc356dea7e: scripted-diff: Rename CAddrInfo to AddrInfo
Branches
Unknown
Tags
Unknown

Event Timeline