浏览代码

core/vm: improve error message for invalid opcodes

Valentin Wüstholz 8 年之前
父节点
当前提交
04b668b232
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/vm/interpreter.go

+ 1 - 1
core/vm/interpreter.go

@@ -151,7 +151,7 @@ func (in *Interpreter) Run(snapshot int, contract *Contract, input []byte) (ret
 
 		// if the op is invalid abort the process and return an error
 		if !operation.valid {
-			return nil, fmt.Errorf("invalid opcode %x", op)
+			return nil, fmt.Errorf("invalid opcode 0x%x", int(op))
 		}
 
 		// validate the stack and make sure there enough stack items available