Merge pull request #1114 from obscuren/develop

core: block.gasLimit - parent.gasLimit <= parent.gasLimit / GasLimitB…
This commit is contained in:
Jeffrey Wilcke 2015-05-26 17:04:42 -07:00
commit aada35af9b
1 changed files with 1 additions and 1 deletions

View File

@ -302,7 +302,7 @@ func (sm *BlockProcessor) ValidateHeader(block, parent *types.Header, checkPow b
a := new(big.Int).Sub(block.GasLimit, parent.GasLimit)
a.Abs(a)
b := new(big.Int).Div(parent.GasLimit, params.GasLimitBoundDivisor)
if !(a.Cmp(b) < 0) || (block.GasLimit.Cmp(params.MinGasLimit) == -1) {
if !(a.Cmp(b) <= 0) || (block.GasLimit.Cmp(params.MinGasLimit) == -1) {
return fmt.Errorf("GasLimit check failed for block %v (%v > %v)", block.GasLimit, a, b)
}