mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core: address comment
This commit is contained in:
parent
4c7d373991
commit
d94d5dd3dd
1 changed files with 3 additions and 3 deletions
|
|
@ -76,10 +76,10 @@ type Message interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
// IntrinsicGas computes the 'intrinsic gas' for a message with the given data.
|
// IntrinsicGas computes the 'intrinsic gas' for a message with the given data.
|
||||||
func IntrinsicGas(data []byte, contractCreation, eip155Active bool, eip2028Active bool) (uint64, error) {
|
func IntrinsicGas(data []byte, contractCreation, isEIP155 bool, isEIP2028 bool) (uint64, error) {
|
||||||
// Set the starting gas for the raw transaction
|
// Set the starting gas for the raw transaction
|
||||||
var gas uint64
|
var gas uint64
|
||||||
if contractCreation && eip155Active {
|
if contractCreation && isEIP155 {
|
||||||
gas = params.TxGasContractCreation
|
gas = params.TxGasContractCreation
|
||||||
} else {
|
} else {
|
||||||
gas = params.TxGas
|
gas = params.TxGas
|
||||||
|
|
@ -95,7 +95,7 @@ func IntrinsicGas(data []byte, contractCreation, eip155Active bool, eip2028Activ
|
||||||
}
|
}
|
||||||
// Make sure we don't exceed uint64 for all data combinations
|
// Make sure we don't exceed uint64 for all data combinations
|
||||||
nonZeroGas := params.TxDataNonZeroGasFrontier
|
nonZeroGas := params.TxDataNonZeroGasFrontier
|
||||||
if eip2028Active {
|
if isEIP2028 {
|
||||||
nonZeroGas = params.TxDataNonZeroGasEIP2028
|
nonZeroGas = params.TxDataNonZeroGasEIP2028
|
||||||
}
|
}
|
||||||
if (math.MaxUint64-gas)/nonZeroGas < nz {
|
if (math.MaxUint64-gas)/nonZeroGas < nz {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue