Age | Commit message (Collapse) | Author |
|
|
|
-BEGIN VERIFY SCRIPT-
git grep -l CAddrInfo src/ | xargs sed -i 's/CAddrInfo/AddrInfo/g'
-END VERIFY SCRIPT-
|
|
-BEGIN VERIFY SCRIPT-
git grep -l CAddrMan src/ test/ | xargs sed -i 's/CAddrMan/AddrMan/g'
-END VERIFY SCRIPT-
|
|
|
|
Maintain comments on the external interfaces rather than on the internal
functions that implement them.
|
|
Update so the internal function signature matches the external one, as is the
case for the other addrman functions.
|
|
Review hint: git diff --color-moved=dimmed-zebra
--color-moved-ws=ignore-all-space
|
|
Since knowledge of CAddrInfo is limited to callsites that import
addrman_impl.h, only objects in addrman.cpp or the tests have access. Thus we
can remove calling them friends and make the members public.
|
|
Now that no bitcoind callers require knowledge of the CAddrInfo object, it can
be moved into the test-only header file.
Review hint: use git diff --color-moved=dimmed-zebra
--color-moved-ws=ignore-all-space
|
|
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.
|
|
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.
Review hint: git diff --color-moved=dimmed-zebra
--color-moved-ws=ignore-all-space
|