mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-29 14:22:55 +00:00
consensus: fix ambiguous invalid gas limit error (#32405)
## 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.
This commit is contained in:
parent
cbbf686ecc
commit
2e9c9b5e98
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue