|
|
@ -246,9 +246,9 @@ void BlockInfo::verifyParent(BlockInfo const& _parent) const |
|
|
|
BOOST_THROW_EXCEPTION(InvalidDifficulty() << RequirementError((bigint)calculateDifficulty(_parent), (bigint)difficulty)); |
|
|
|
|
|
|
|
if (gasLimit < c_minGasLimit || |
|
|
|
gasLimit < _parent.gasLimit * (c_gasLimitBoundDivisor - 1) / c_gasLimitBoundDivisor || |
|
|
|
gasLimit > _parent.gasLimit * (c_gasLimitBoundDivisor + 1) / c_gasLimitBoundDivisor) |
|
|
|
BOOST_THROW_EXCEPTION(InvalidGasLimit() << errinfo_min((bigint)_parent.gasLimit * (c_gasLimitBoundDivisor - 1) / c_gasLimitBoundDivisor) << errinfo_got((bigint)gasLimit) << errinfo_max((bigint)_parent.gasLimit * (c_gasLimitBoundDivisor + 1) / c_gasLimitBoundDivisor)); |
|
|
|
gasLimit < _parent.gasLimit - _parent.gasLimit / c_gasLimitBoundDivisor || |
|
|
|
gasLimit > _parent.gasLimit + _parent.gasLimit / c_gasLimitBoundDivisor) |
|
|
|
BOOST_THROW_EXCEPTION(InvalidGasLimit() << errinfo_min((bigint)_parent.gasLimit - _parent.gasLimit / c_gasLimitBoundDivisor) << errinfo_got((bigint)gasLimit) << errinfo_max((bigint)_parent.gasLimit + _parent.gasLimit / c_gasLimitBoundDivisor)); |
|
|
|
|
|
|
|
// Check timestamp is after previous timestamp.
|
|
|
|
if (parentHash) |
|
|
|