consensus: define MaxGasLimit as a const in params (#24092)
* consensus: use the maxGasLimit constant to check the header.GasLimit to avoid creating new variables repeatedly * consensus: check the header.GasLimit by the public constant MaxGasLimit * consensus: check the header.GasLimit by the constant MaxGasLimit
This commit is contained in:
@ -19,9 +19,10 @@ package params
|
||||
import "math/big"
|
||||
|
||||
const (
|
||||
GasLimitBoundDivisor uint64 = 1024 // The bound divisor of the gas limit, used in update calculations.
|
||||
MinGasLimit uint64 = 5000 // Minimum the gas limit may ever be.
|
||||
GenesisGasLimit uint64 = 4712388 // Gas limit of the Genesis block.
|
||||
GasLimitBoundDivisor uint64 = 1024 // The bound divisor of the gas limit, used in update calculations.
|
||||
MinGasLimit uint64 = 5000 // Minimum the gas limit may ever be.
|
||||
MaxGasLimit uint64 = 0x7fffffffffffffff // Maximum the gas limit (2^63-1).
|
||||
GenesisGasLimit uint64 = 4712388 // Gas limit of the Genesis block.
|
||||
|
||||
MaximumExtraDataSize uint64 = 32 // Maximum size extra data may be after Genesis.
|
||||
ExpByteGas uint64 = 10 // Times ceil(log256(exponent)) for the EXP instruction.
|
||||
|
Reference in New Issue
Block a user