mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02: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:
parent
03bfeee957
commit
86ff2cf202
11 changed files with 48 additions and 27 deletions
|
|
@ -592,11 +592,13 @@ public:
|
|||
}
|
||||
CFeeRate estimateSmartFee(int num_blocks, bool conservative, FeeCalculation* calc) override
|
||||
{
|
||||
return ::feeEstimator.estimateSmartFee(num_blocks, calc, conservative);
|
||||
if (!m_node.fee_estimator) return {};
|
||||
return m_node.fee_estimator->estimateSmartFee(num_blocks, calc, conservative);
|
||||
}
|
||||
unsigned int estimateMaxBlocks() override
|
||||
{
|
||||
return ::feeEstimator.HighestTargetTracked(FeeEstimateHorizon::LONG_HALFLIFE);
|
||||
if (!m_node.fee_estimator) return 0;
|
||||
return m_node.fee_estimator->HighestTargetTracked(FeeEstimateHorizon::LONG_HALFLIFE);
|
||||
}
|
||||
CFeeRate mempoolMinFee() override
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue