021f86953e
[style] Run changed files through clang formatter. (Amiti Uttarwar)375750387e
scripted-diff: Rename CAddrInfo to AddrInfo (Amiti Uttarwar)dd8f7f2500
scripted-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: ACK021f86953e
GeneFerneau: utACK [021f869
](021f86953e
) mzumsande: ACK021f86953e
rajarshimaitra: Concept + Code Review ACK021f86953e
theuni: ACK021f86953e
Tree-SHA512: aa70cb77927a35c85230163c0cf6d3872382d79048b0fb79341493caa46f8e91498cb787d8b06aba4da17b2f921f2230e73f3d66385519794fff86a831b3a71d
src/node/
The src/node/
directory contains code that needs to access node state
(state in CChain
, CBlockIndex
, CCoinsView
, CTxMemPool
, and similar
classes).
Code in src/node/
is meant to be segregated from code in
src/wallet/
and src/qt/
, to ensure wallet and GUI
code changes don't interfere with node operation, to allow wallet and GUI code
to run in separate processes, and to perhaps eventually allow wallet and GUI
code to be maintained in separate source repositories.
As a rule of thumb, code in one of the src/node/
,
src/wallet/
, or src/qt/
directories should avoid
calling code in the other directories directly, and only invoke it indirectly
through the more limited src/interfaces/
classes.
This directory is at the moment
sparsely populated. Eventually more substantial files like
src/validation.cpp
and
src/txmempool.cpp
might be moved there.