Skip to content

Commit

Permalink
Fix error message returned by EstimateFee
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Appelberg-s authored and jcvernaleo committed Feb 9, 2021
1 parent 2a1aa51 commit dff2198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mempool/estimatefee.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit dff2198

Please sign in to comment.