diff options
author | ismaelsadeeq <ask4ismailsadiq@gmail.com> | 2023-11-08 11:21:49 +0100 |
---|---|---|
committer | ismaelsadeeq <ask4ismailsadiq@gmail.com> | 2023-11-22 11:48:21 +0100 |
commit | 91504cbe0de2b74ef1aa2709761aaf0597ec66a2 (patch) | |
tree | 49061ab23a9ba79187f140319eaada7140fc5f92 /src/rpc | |
parent | 714523918ba2b853fc69bee6b04a33ba0c828bf5 (diff) |
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.
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/fees.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rpc/fees.cpp b/src/rpc/fees.cpp index 62396d4c58..57ba486ed9 100644 --- a/src/rpc/fees.cpp +++ b/src/rpc/fees.cpp @@ -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; |