[net] Move asmap into NetGroupManager

This commit is contained in:
John Newbery
2021-08-31 18:40:18 +01:00
parent 17c24d4580
commit 19431560e3
16 changed files with 158 additions and 132 deletions

View File

@@ -17,6 +17,7 @@
#include <net_permissions.h>
#include <netaddress.h>
#include <netbase.h>
#include <netgroup.h>
#include <policy/feerate.h>
#include <protocol.h>
#include <random.h>
@@ -787,7 +788,9 @@ public:
m_onion_binds = connOptions.onion_binds;
}
CConnman(uint64_t seed0, uint64_t seed1, AddrMan& addrman, bool network_active = true);
CConnman(uint64_t seed0, uint64_t seed1, AddrMan& addrman, const NetGroupManager& netgroupman,
bool network_active = true);
~CConnman();
bool Start(CScheduler& scheduler, const Options& options);
@@ -1085,6 +1088,7 @@ private:
std::atomic<bool> fNetworkActive{true};
bool fAddressesInitialized{false};
AddrMan& addrman;
const NetGroupManager& m_netgroupman;
std::deque<std::string> m_addr_fetches GUARDED_BY(m_addr_fetches_mutex);
Mutex m_addr_fetches_mutex;
std::vector<std::string> m_added_nodes GUARDED_BY(m_added_nodes_mutex);