mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
36f814c0e8[netgroupman] Remove NetGroupManager::GetAsmap() (John Newbery)4709fc2019[netgroupman] Move asmap checksum calculation to NetGroupManager (John Newbery)1b978a7e8c[netgroupman] Move GetMappedAS() and GetGroup() logic to NetGroupManager (John Newbery)ddb4101e63[net] Only use public CNetAddr functions and data in GetMappedAS() and GetGroup() (John Newbery)6b2268162e[netgroupman] Add GetMappedAS() and GetGroup() (John Newbery)19431560e3[net] Move asmap into NetGroupManager (John Newbery)17c24d4580[init] Add netgroupman to node.context (John Newbery)9b3836710b[build] Add netgroup.cpp|h (John Newbery) Pull request description: The asmap data is currently owned by addrman, but is used by both addrman and connman. #22791 made the data const and private (so that it can't be updated by other components), but it is still passed out of addrman as a reference to const, and used by `CNetAddress` to calculate the group and AS of the net address. This RFC PR proposes to move all asmap data and logic into a new `NetGroupManager` component. This is initialized at startup, and the client components addrman and connman simply call `NetGroupManager::GetGroup(const CAddress&)` and `NetGroupManager::GetMappedAS(const CAddress&)` to get the net group and AS of an address. ACKs for top commit: mzumsande: Code Review ACK36f814c0e8jnewbery: CI failure seems spurious. I rebased onto latest master to trigger a new CI run, but whilst I was doing that, mzumsande ACKed36f814c0e8, so I've reverted to that. dergoegge: Code review ACK36f814c0e8Tree-SHA512: 244a89cdfd720d8cce679eae5b7951e1b46b37835fccb6bdfa362856761bb110e79e263a6eeee8246140890f3bee2850e9baa7bc14a388a588e0e29b9d275175