From 2e9c9b5e981595a24ac75baae64999b86060b5bd Mon Sep 17 00:00:00 2001 From: Rizky Ikwan Date: Tue, 12 Aug 2025 14:11:18 +0200 Subject: [PATCH] consensus: fix ambiguous invalid gas limit error (#32405) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Correct symmetric tolerance in gas limit validation: Replace ambiguous "+-=" with standard "+/-" in the error message. Logic rejects when |header − parent| ≥ limit, so allowed range is |Δ| ≤ limit − 1. No logic or functionality has been modified. --- consensus/misc/gaslimit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consensus/misc/gaslimit.go b/consensus/misc/gaslimit.go index dfcabd9a80..9ae8c95f4b 100644 --- a/consensus/misc/gaslimit.go +++ b/consensus/misc/gaslimit.go @@ -32,7 +32,7 @@ func VerifyGaslimit(parentGasLimit, headerGasLimit uint64) error { } limit := parentGasLimit / params.GasLimitBoundDivisor if uint64(diff) >= limit { - return fmt.Errorf("invalid gas limit: have %d, want %d +-= %d", headerGasLimit, parentGasLimit, limit-1) + return fmt.Errorf("invalid gas limit: have %d, want %d +/- %d", headerGasLimit, parentGasLimit, limit-1) } if headerGasLimit < params.MinGasLimit { return fmt.Errorf("invalid gas limit below %d", params.MinGasLimit)