Browse Source

fix blockGasLimit bug : 1024 -> 2048

cl-refactor
CJentzsch 10 years ago
committed by Gav Wood
parent
commit
21163d44e2
  1. 4
      libethcore/BlockInfo.cpp

4
libethcore/BlockInfo.cpp

@ -218,8 +218,8 @@ void BlockInfo::verifyParent(BlockInfo const& _parent) const
gasLimit > _parent.gasLimit * (c_gasLimitBoundDivisor + 1) / c_gasLimitBoundDivisor)
BOOST_THROW_EXCEPTION(InvalidGasLimit(gasLimit, _parent.gasLimit * (c_gasLimitBoundDivisor - 1) / c_gasLimitBoundDivisor, _parent.gasLimit * (c_gasLimitBoundDivisor + 1) / c_gasLimitBoundDivisor));
if (diff(gasLimit, _parent.gasLimit) <= _parent.gasLimit / 1024)
BOOST_THROW_EXCEPTION(InvalidGasLimit(gasLimit, calculateGasLimit(_parent), diff(gasLimit, _parent.gasLimit), _parent.gasLimit / 1024));
if (diff(gasLimit, _parent.gasLimit) <= _parent.gasLimit / 2048)
BOOST_THROW_EXCEPTION(InvalidGasLimit(gasLimit, calculateGasLimit(_parent), diff(gasLimit, _parent.gasLimit), _parent.gasLimit / 2048));
// Check timestamp is after previous timestamp.
if (parentHash)

Loading…
Cancel
Save