Page MenuHomePhabricator

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

Authored by Fabien on Oct 20 2022, 12:55.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable