core, params: tiny fixes and polish

This commit is contained in:
rjl493456442 2018-07-24 18:25:16 +08:00
parent f5c04c8b4c
commit dc894c1f4d
2 changed files with 2 additions and 6 deletions

View file

@ -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
}

View file

@ -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,