From 1a7fb5eeeef3575c1e7c27915c9b98695191299d Mon Sep 17 00:00:00 2001 From: ismaelsadeeq Date: Mon, 12 Aug 2024 15:40:20 +0100 Subject: [PATCH] fees: return current block height in estimateSmartFee --- src/policy/fees/block_policy_estimator.cpp | 1 + src/policy/fees/block_policy_estimator.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/policy/fees/block_policy_estimator.cpp b/src/policy/fees/block_policy_estimator.cpp index 791c4893fb..a3327cfa66 100644 --- a/src/policy/fees/block_policy_estimator.cpp +++ b/src/policy/fees/block_policy_estimator.cpp @@ -875,6 +875,7 @@ CFeeRate CBlockPolicyEstimator::estimateSmartFee(int confTarget, FeeCalculation if (feeCalc) { feeCalc->desiredTarget = confTarget; feeCalc->returnedTarget = confTarget; + feeCalc->best_height = nBestSeenHeight; } double median = -1; diff --git a/src/policy/fees/block_policy_estimator.h b/src/policy/fees/block_policy_estimator.h index 7cb9da8f47..ed561d9a6e 100644 --- a/src/policy/fees/block_policy_estimator.h +++ b/src/policy/fees/block_policy_estimator.h @@ -95,6 +95,7 @@ struct FeeCalculation FeeReason reason = FeeReason::NONE; int desiredTarget = 0; int returnedTarget = 0; + unsigned int best_height{0}; }; /** \class CBlockPolicyEstimator