aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJhih-Ming Huang <jm.huang@cobinhood.com>2019-03-15 16:02:49 +0800
committerJhih-Ming Huang <jm.huang@cobinhood.com>2019-05-06 10:44:04 +0800
commitb46e4244ab17b696674cb3e263fe407e557e8127 (patch)
tree54823499b6336987e9b98c46642a400eab5eb78a
parentc02fb054e521b1d29b3ae1e1917778a5f92dc05c (diff)
downloaddexon-b46e4244ab17b696674cb3e263fe407e557e8127.tar.gz
dexon-b46e4244ab17b696674cb3e263fe407e557e8127.tar.zst
dexon-b46e4244ab17b696674cb3e263fe407e557e8127.zip
core: vm: remain first byte, if it is not VM enum.
* If first byte is not VM enum, we should reserve it as checking VM type. * Remove debug print.
-rw-r--r--core/vm/vm.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/vm/vm.go b/core/vm/vm.go
index 4c39d401c..99ab2ed90 100644
--- a/core/vm/vm.go
+++ b/core/vm/vm.go
@@ -1,7 +1,6 @@
package vm
import (
- "fmt"
"math/big"
"github.com/dexon-foundation/dexon/common"
@@ -97,8 +96,7 @@ func getVMAndCode(code []byte) (byte, []byte) {
case EVM, SQLVM:
return code[0], code[1:]
default:
- fmt.Printf("Unknown code prefix %x\n", code[0])
- return EVM, code[1:]
+ return EVM, code
}
}
return EVM, code