fix debug_traceTransaction crashed issue (#13)

This commit is contained in:
zjubfd 2020-06-30 16:15:12 +08:00 committed by GitHub
parent 11bc803884
commit 5e4f5785c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -162,10 +162,11 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (
// as every returning call will return new data anyway. // as every returning call will return new data anyway.
in.returnData = nil in.returnData = nil
// TODO temporary fix for issue
// Don't bother with the execution if there's no code. // Don't bother with the execution if there's no code.
if len(contract.Code) == 0 { //if len(contract.Code) == 0 {
return nil, nil // return nil, nil
} //}
var ( var (
op OpCode // current opcode op OpCode // current opcode