aboutsummaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2020-10-23 09:34:27 +0100
committerJohn Newbery <john@johnnewbery.com>2021-03-20 10:24:36 +0000
commit1c25adf6d278eb1a1f018986a126d0eb8137e0ee (patch)
treed281bae2edbf480286d1eaa417953b2a4c7b13a1 /src/node
parent3530d5d2d851d025b013b2ea79ed39a57cbbafcd (diff)
downloadbitcoin-1c25adf6d278eb1a1f018986a126d0eb8137e0ee.tar.xz
[net] Construct addrman outside connman
node.context owns the CAddrMan. CConnman holds a reference to the CAddrMan.
Diffstat (limited to 'src/node')
-rw-r--r--src/node/context.cpp1
-rw-r--r--src/node/context.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/node/context.cpp b/src/node/context.cpp
index 958221a913..6d22a6b110 100644
--- a/src/node/context.cpp
+++ b/src/node/context.cpp
@@ -4,6 +4,7 @@
#include <node/context.h>
+#include <addrman.h>
#include <banman.h>
#include <interfaces/chain.h>
#include <net.h>
diff --git a/src/node/context.h b/src/node/context.h
index 9b611bf8f5..2be9a584e6 100644
--- a/src/node/context.h
+++ b/src/node/context.h
@@ -12,6 +12,7 @@
class ArgsManager;
class BanMan;
+class CAddrMan;
class CBlockPolicyEstimator;
class CConnman;
class CScheduler;
@@ -35,6 +36,7 @@ class WalletClient;
//! any member functions. It should just be a collection of references that can
//! be used without pulling in unwanted dependencies or functionality.
struct NodeContext {
+ std::unique_ptr<CAddrMan> addrman;
std::unique_ptr<CConnman> connman;
std::unique_ptr<CTxMemPool> mempool;
std::unique_ptr<CBlockPolicyEstimator> fee_estimator;