aboutsummaryrefslogtreecommitdiff
path: root/src/addrman_impl.h
AgeCommit message (Collapse)Author
2021-09-28[style] Run changed files through clang formatter.Amiti Uttarwar
2021-09-28scripted-diff: Rename CAddrInfo to AddrInfoAmiti Uttarwar
-BEGIN VERIFY SCRIPT- git grep -l CAddrInfo src/ | xargs sed -i 's/CAddrInfo/AddrInfo/g' -END VERIFY SCRIPT-
2021-09-28scripted-diff: Rename CAddrMan to AddrManAmiti Uttarwar
-BEGIN VERIFY SCRIPT- git grep -l CAddrMan src/ test/ | xargs sed -i 's/CAddrMan/AddrMan/g' -END VERIFY SCRIPT-
2021-09-28[includes] Fix up included filesAmiti Uttarwar
2021-09-28[doc] Update commentsAmiti Uttarwar
Maintain comments on the external interfaces rather than on the internal functions that implement them.
2021-09-28[refactor] Update GetAddr_() function signatureAmiti Uttarwar
Update so the internal function signature matches the external one, as is the case for the other addrman functions.
2021-09-28[move-only] Move constants to test-only headerAmiti Uttarwar
Review hint: git diff --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
2021-09-28[addrman] Change CAddrInfo accessAmiti Uttarwar
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.
2021-09-28[move-only] Move CAddrInfo to test-only header fileAmiti Uttarwar
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
2021-09-28[net, addrman] Remove external dependencies on CAddrInfo objectsAmiti Uttarwar
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.
2021-09-28[addrman] Introduce CAddrMan::Impl to encapsulate addrman implementation.Amiti Uttarwar
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