Skip to content

Commit aada35a

Browse files
committed
Merge pull request #1114 from obscuren/develop
core: block.gasLimit - parent.gasLimit <= parent.gasLimit / GasLimitB…
2 parents 3590591 + be2b050 commit aada35a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/block_processor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ func (sm *BlockProcessor) ValidateHeader(block, parent *types.Header, checkPow b
302302
a := new(big.Int).Sub(block.GasLimit, parent.GasLimit)
303303
a.Abs(a)
304304
b := new(big.Int).Div(parent.GasLimit, params.GasLimitBoundDivisor)
305-
if !(a.Cmp(b) < 0) || (block.GasLimit.Cmp(params.MinGasLimit) == -1) {
305+
if !(a.Cmp(b) <= 0) || (block.GasLimit.Cmp(params.MinGasLimit) == -1) {
306306
return fmt.Errorf("GasLimit check failed for block %v (%v > %v)", block.GasLimit, a, b)
307307
}
308308

0 commit comments

Comments
 (0)