Skip to content

Commit 1e0de7a

Browse files
committed
fees: document non-monotonic estimation edge case
Closes: #11800 Note: In certain rare edge cases, monotonically increasing estimates may not be guaranteed. Specifically, given two targets N and M, where M > N, if a sub-estimate for target N fails to return a valid fee rate, while target M has valid fee rate for that sub-estimate, target M may result in a higher fee rate estimate than target N. See: bitcoin/bitcoin#11800 (comment)
1 parent baa848b commit 1e0de7a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/policy/fees.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,14 @@ CFeeRate CBlockPolicyEstimator::estimateSmartFee(int confTarget, FeeCalculation
905905
* horizons so we already have monotonically increasing estimates and
906906
* the purpose of conservative estimates is not to let short term
907907
* fluctuations lower our estimates by too much.
908+
*
909+
* Note: In certain rare edge cases, monotonically increasing estimates may
910+
* not be guaranteed. Specifically, given two targets N and M, where M > N,
911+
* if a sub-estimate for target N fails to return a valid fee rate, while
912+
* target M has valid fee rate for that sub-estimate, target M may result
913+
* in a higher fee rate estimate than target N.
914+
*
915+
* See: https://github.com/bitcoin/bitcoin/issues/11800#issuecomment-349697807
908916
*/
909917
double halfEst = estimateCombinedFee(confTarget/2, HALF_SUCCESS_PCT, true, &tempResult);
910918
if (feeCalc) {

0 commit comments

Comments
 (0)