HomePhabricator

[net, addrman] Remove external dependencies on CAddrInfo objects

Description

[net, addrman] Remove external dependencies on CAddrInfo objects

Summary:

CAddrInfo objects are an implementation detail of how AddrMan manages and adds metadata to different records. Encapsulate this logic by updating Select & SelectTriedCollision to return the additional info that the callers need.

Partial backport of core#22950:
https://github.com/bitcoin/bitcoin/pull/22950/commits/7cba9d56185b9325ce41d79364e448462fff0f6a

Depends on D12329.

Test Plan:

ninja all check

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
Amiti Uttarwar <amiti@uttarwar.org>Authored on Aug 25 2021, 22:40
FabienCommitted on Oct 21 2022, 08:34
FabienPushed on Oct 21 2022, 08:34
Reviewer
Restricted Project
Differential Revision
D12330: [net, addrman] Remove external dependencies on CAddrInfo objects
Parents
rABC447abdcd540a: [addrman] Introduce CAddrMan::Impl to encapsulate addrman implementation.
Branches
Unknown
Tags
Unknown