diff options
author | obscuren <geffobscura@gmail.com> | 2015-05-27 07:52:03 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-05-27 07:52:03 +0800 |
commit | be2b0501b5832c0b49f07cdf2db597cc34450199 (patch) | |
tree | e51380fdbb4be105d7fdd2783122511f1150bb8f | |
parent | 3590591e674b14fd025aac91952d9408bb841527 (diff) | |
download | dexon-be2b0501b5832c0b49f07cdf2db597cc34450199.tar.gz dexon-be2b0501b5832c0b49f07cdf2db597cc34450199.tar.zst dexon-be2b0501b5832c0b49f07cdf2db597cc34450199.zip |
core: block.gasLimit - parent.gasLimit <= parent.gasLimit / GasLimitBoundDivisor
-rw-r--r-- | core/block_processor.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/block_processor.go b/core/block_processor.go index 037782407..e808c03da 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -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) } |