mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 15:04:44 +01:00
rpc: SyncWithValidationInterfaceQueue
on fee estimation RPC's
This ensures that the most recent fee estimation data is used for the fee estimation with `estimateSmartfee` and `estimaterawfee` RPC's.
This commit is contained in:
parent
714523918b
commit
91504cbe0d
1 changed files with 3 additions and 0 deletions
|
@ -14,6 +14,7 @@
|
|||
#include <txmempool.h>
|
||||
#include <univalue.h>
|
||||
#include <util/fees.h>
|
||||
#include <validationinterface.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
@ -67,6 +68,7 @@ static RPCHelpMan estimatesmartfee()
|
|||
const NodeContext& node = EnsureAnyNodeContext(request.context);
|
||||
const CTxMemPool& mempool = EnsureMemPool(node);
|
||||
|
||||
SyncWithValidationInterfaceQueue();
|
||||
unsigned int max_target = fee_estimator.HighestTargetTracked(FeeEstimateHorizon::LONG_HALFLIFE);
|
||||
unsigned int conf_target = ParseConfirmTarget(request.params[0], max_target);
|
||||
bool conservative = true;
|
||||
|
@ -155,6 +157,7 @@ static RPCHelpMan estimaterawfee()
|
|||
{
|
||||
CBlockPolicyEstimator& fee_estimator = EnsureAnyFeeEstimator(request.context);
|
||||
|
||||
SyncWithValidationInterfaceQueue();
|
||||
unsigned int max_target = fee_estimator.HighestTargetTracked(FeeEstimateHorizon::LONG_HALFLIFE);
|
||||
unsigned int conf_target = ParseConfirmTarget(request.params[0], max_target);
|
||||
double threshold = 0.95;
|
||||
|
|
Loading…
Add table
Reference in a new issue