mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +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:
@@ -109,7 +109,7 @@ class AddrmanTest(BitcoinTestFramework):
|
||||
self.stop_node(0)
|
||||
write_addrman(peers_dat, len_tried=-1)
|
||||
self.nodes[0].assert_start_raises_init_error(
|
||||
expected_msg=init_error("Corrupt CAddrMan serialization: nTried=-1, should be in \\[0, 16384\\]:.*"),
|
||||
expected_msg=init_error("Corrupt AddrMan serialization: nTried=-1, should be in \\[0, 16384\\]:.*"),
|
||||
match=ErrorMatch.FULL_REGEX,
|
||||
)
|
||||
|
||||
@@ -117,7 +117,7 @@ class AddrmanTest(BitcoinTestFramework):
|
||||
self.stop_node(0)
|
||||
write_addrman(peers_dat, len_new=-1)
|
||||
self.nodes[0].assert_start_raises_init_error(
|
||||
expected_msg=init_error("Corrupt CAddrMan serialization: nNew=-1, should be in \\[0, 65536\\]:.*"),
|
||||
expected_msg=init_error("Corrupt AddrMan serialization: nNew=-1, should be in \\[0, 65536\\]:.*"),
|
||||
match=ErrorMatch.FULL_REGEX,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user