From 547f1730e685e276e1503559dbb8eef4ad98cf5f Mon Sep 17 00:00:00 2001 From: meows Date: Fri, 15 Nov 2019 15:50:48 -0500 Subject: [PATCH 1/2] core: s/isEIP155/isEIP2/ (fix) This signature variable name reflects a spec'd change in gas cost for creating contracts as documented in EIP2 (Homestead HF). https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2.md#specification --- core/state_transition.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/state_transition.go b/core/state_transition.go index bef6e9b0eb2f..235b69991b7e 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -76,10 +76,10 @@ type Message interface { } // IntrinsicGas computes the 'intrinsic gas' for a message with the given data. -func IntrinsicGas(data []byte, contractCreation, isEIP155 bool, isEIP2028 bool) (uint64, error) { +func IntrinsicGas(data []byte, contractCreation, isEIP2 bool, isEIP2028 bool) (uint64, error) { // Set the starting gas for the raw transaction var gas uint64 - if contractCreation && isEIP155 { + if contractCreation && isEIP2 { gas = params.TxGasContractCreation } else { gas = params.TxGas From a323c4c7c036fc11ad3b67b3f79ca9fe4650cc46 Mon Sep 17 00:00:00 2001 From: meows Date: Mon, 18 Nov 2019 04:34:16 -0500 Subject: [PATCH 2/2] core: s/isEIP2/sIsHomestead/g Use isHomestead since Homestead is what the caller and rest of the code uses. --- core/state_transition.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/state_transition.go b/core/state_transition.go index 235b69991b7e..1d371f36d537 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -76,10 +76,10 @@ type Message interface { } // IntrinsicGas computes the 'intrinsic gas' for a message with the given data. -func IntrinsicGas(data []byte, contractCreation, isEIP2 bool, isEIP2028 bool) (uint64, error) { +func IntrinsicGas(data []byte, contractCreation, isHomestead bool, isEIP2028 bool) (uint64, error) { // Set the starting gas for the raw transaction var gas uint64 - if contractCreation && isEIP2 { + if contractCreation && isHomestead { gas = params.TxGasContractCreation } else { gas = params.TxGas