From 898d1f0c6742cd39921208ebb8f89efc7c2a65ec Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 8 Feb 2024 11:32:18 +0100 Subject: [PATCH] eth/gasprice: fix percentile validation in eth_feeHistory --- eth/gasprice/feehistory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/gasprice/feehistory.go b/eth/gasprice/feehistory.go index 226991b24b..3d5d0d136d 100644 --- a/eth/gasprice/feehistory.go +++ b/eth/gasprice/feehistory.go @@ -227,7 +227,7 @@ func (oracle *Oracle) FeeHistory(ctx context.Context, blocks uint64, unresolvedL if p < 0 || p > 100 { return common.Big0, nil, nil, nil, fmt.Errorf("%w: %f", errInvalidPercentile, p) } - if i > 0 && p < rewardPercentiles[i-1] { + if i > 0 && p <= rewardPercentiles[i-1] { return common.Big0, nil, nil, nil, fmt.Errorf("%w: #%d:%f > #%d:%f", errInvalidPercentile, i-1, rewardPercentiles[i-1], i, p) } }