HomePhabricator

[addrman] Introduce CAddrMan::Impl to encapsulate addrman implementation.

Description

[addrman] Introduce CAddrMan::Impl to encapsulate addrman implementation.

Summary:

Introduce the pimpl pattern for CAddrMan to separate the implementation details from the externally used object representation. This reduces compile-time dependencies and conceptually clarifies AddrMan's interface from the implementation specifics.

Since the unit & fuzz tests currently rely on accessing CAddrMan internals, this commit introduces addrman_impl.h, which is exclusively imported by addrman.cpp and test files.

Partial backport of core#22950:
https://github.com/bitcoin/bitcoin/pull/22950/commits/8af5b54f973e11c847345418d8631bc301b96130

Depends on D12328.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
Amiti Uttarwar <amiti@uttarwar.org>Authored on Sep 1 2021, 18:21
FabienCommitted on Oct 21 2022, 08:34
FabienPushed on Oct 21 2022, 08:34
Reviewer
Restricted Project
Differential Revision
D12329: [addrman] Introduce CAddrMan::Impl to encapsulate addrman implementation.
Parents
rABCaa2641ec9a81: [move-only] Match ordering of CAddrMan declarations and definitions
Branches
Unknown
Tags
Unknown