mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Merge bitcoin/bitcoin#22950: [p2p] Pimpl AddrMan to abstract implementation details
021f86953e[style] Run changed files through clang formatter. (Amiti Uttarwar)375750387escripted-diff: Rename CAddrInfo to AddrInfo (Amiti Uttarwar)dd8f7f2500scripted-diff: Rename CAddrMan to AddrMan (Amiti Uttarwar)3c263d3f63[includes] Fix up included files (Amiti Uttarwar)29727c2aa1[doc] Update comments (Amiti Uttarwar)14f9e000d0[refactor] Update GetAddr_() function signature (Amiti Uttarwar)40acd6fc9a[move-only] Move constants to test-only header (Amiti Uttarwar)7cf41bbb38[addrman] Change CAddrInfo access (Amiti Uttarwar)e3f1ea659c[move-only] Move CAddrInfo to test-only header file (Amiti Uttarwar)7cba9d5618[net, addrman] Remove external dependencies on CAddrInfo objects (Amiti Uttarwar)8af5b54f97[addrman] Introduce CAddrMan::Impl to encapsulate addrman implementation. (Amiti Uttarwar)f2e5f38f09[move-only] Match ordering of CAddrMan declarations and definitions (Amiti Uttarwar)5faa7dd6d8[move-only] Move CAddrMan function definitions to cpp (Amiti Uttarwar) Pull request description: Introduce the pimpl pattern for AddrMan 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 AddrMan internals, this PR introduces addrman_impl.h, which is exclusively imported by addrman.cpp and test files. ACKs for top commit: jnewbery: ACK021f86953eGeneFerneau: utACK [021f869](021f86953e) mzumsande: ACK021f86953erajarshimaitra: Concept + Code Review ACK021f86953etheuni: ACK021f86953eTree-SHA512: aa70cb77927a35c85230163c0cf6d3872382d79048b0fb79341493caa46f8e91498cb787d8b06aba4da17b2f921f2230e73f3d66385519794fff86a831b3a71d
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
class ArgsManager;
|
||||
class BanMan;
|
||||
class CAddrMan;
|
||||
class AddrMan;
|
||||
class CBlockPolicyEstimator;
|
||||
class CConnman;
|
||||
class CScheduler;
|
||||
@@ -39,7 +39,7 @@ class WalletClient;
|
||||
struct NodeContext {
|
||||
//! Init interface for initializing current process and connecting to other processes.
|
||||
interfaces::Init* init{nullptr};
|
||||
std::unique_ptr<CAddrMan> addrman;
|
||||
std::unique_ptr<AddrMan> addrman;
|
||||
std::unique_ptr<CConnman> connman;
|
||||
std::unique_ptr<CTxMemPool> mempool;
|
||||
std::unique_ptr<CBlockPolicyEstimator> fee_estimator;
|
||||
|
||||
Reference in New Issue
Block a user