aboutsummaryrefslogtreecommitdiff
path: root/src/node/context.h
diff options
context:
space:
mode:
authorAntoine Poinsot <darosior@protonmail.com>2020-07-28 19:12:50 +0200
committerAntoine Poinsot <darosior@protonmail.com>2020-12-03 12:56:37 +0100
commit86ff2cf202bfb9d9b50800b8ffe3fead3f77f5fa (patch)
tree112793cb81c576520e0a4e7573556f239d95b87c /src/node/context.h
parent03bfeee957ab7e3b6aece82b9561774648094f54 (diff)
downloadbitcoin-86ff2cf202bfb9d9b50800b8ffe3fead3f77f5fa.tar.xz
Remove the remaining fee estimation globals
This moves the CBlockPolicyEstimator to the NodeContext, which get rids of two globals and allows us to conditionally create the CBlockPolicyEstimator (and to remove a circular dep). Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
Diffstat (limited to 'src/node/context.h')
-rw-r--r--src/node/context.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node/context.h b/src/node/context.h
index 3228831ed1..9b611bf8f5 100644
--- a/src/node/context.h
+++ b/src/node/context.h
@@ -12,6 +12,7 @@
class ArgsManager;
class BanMan;
+class CBlockPolicyEstimator;
class CConnman;
class CScheduler;
class CTxMemPool;
@@ -36,6 +37,7 @@ class WalletClient;
struct NodeContext {
std::unique_ptr<CConnman> connman;
std::unique_ptr<CTxMemPool> mempool;
+ std::unique_ptr<CBlockPolicyEstimator> fee_estimator;
std::unique_ptr<PeerManager> peerman;
ChainstateManager* chainman{nullptr}; // Currently a raw pointer because the memory is not managed by this struct
std::unique_ptr<BanMan> banman;