From dff2198fc543e7ae86f25bbf63193024fde7f5b1 Mon Sep 17 00:00:00 2001 From: Appelberg-s <Appelberg-s@users.noreply.github.com> Date: Mon, 11 Jan 2021 19:39:22 +0100 Subject: [PATCH] Fix error message returned by EstimateFee When you provide an argument to EstimateFee(numblocks uint32) that exceeds the estimateFeeDepth (which is set to 25), you get an error message that says "can only estimate fees for up to 100 blocks from now". The variable used in the if condition and the variable used for creating the error message should be the same. --- mempool/estimatefee.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mempool/estimatefee.go b/mempool/estimatefee.go index 3546f6b3..55fe4810 100644 --- a/mempool/estimatefee.go +++ b/mempool/estimatefee.go @@ -563,7 +563,7 @@ func (ef *FeeEstimator) EstimateFee(numBlocks uint32) (BtcPerKilobyte, error) { if numBlocks > estimateFeeDepth { return -1, fmt.Errorf( "can only estimate fees for up to %d blocks from now", - estimateFeeBinSize) + estimateFeeDepth) } // If there are no cached results, generate them.