mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
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>
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include <net.h>
|
||||
#include <net_processing.h>
|
||||
#include <noui.h>
|
||||
#include <policy/fees.h>
|
||||
#include <pow.h>
|
||||
#include <rpc/blockchain.h>
|
||||
#include <rpc/register.h>
|
||||
@@ -141,7 +142,8 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const
|
||||
|
||||
pblocktree.reset(new CBlockTreeDB(1 << 20, true));
|
||||
|
||||
m_node.mempool = MakeUnique<CTxMemPool>(&::feeEstimator, 1);
|
||||
m_node.fee_estimator = std::make_unique<CBlockPolicyEstimator>();
|
||||
m_node.mempool = std::make_unique<CTxMemPool>(m_node.fee_estimator.get(), 1);
|
||||
|
||||
m_node.chainman = &::g_chainman;
|
||||
m_node.chainman->InitializeChainstate(*m_node.mempool);
|
||||
|
||||
Reference in New Issue
Block a user