diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 51dffa6f74..683150323b 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -498,11 +498,7 @@ func opExtCodeCopy(pc *uint64, evm *EVM, contract *Contract, memory *Memory, sta func opExtCodeHash(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) { slot := stack.peek() - if hash := evm.StateDB.GetCodeHash(common.BigToAddress(slot)); hash == (common.Hash{}) { - slot.SetUint64(0) - } else { - slot.SetBytes(hash.Bytes()) - } + slot.SetBytes(evm.StateDB.GetCodeHash(common.BigToAddress(slot)).Bytes()) return nil, nil } diff --git a/params/gas_table.go b/params/gas_table.go index 590c43dd81..6c4a38269c 100644 --- a/params/gas_table.go +++ b/params/gas_table.go @@ -64,7 +64,7 @@ var ( CreateBySuicide: 25000, } // GasTableEIP158 contain the gas re-prices for - // the EIP158 phase. + // the EIP155/EIP158 phase. GasTableEIP158 = GasTable{ ExtcodeSize: 700, ExtcodeCopy: 700,