aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJM <jm@dexon.org>2019-02-13 16:11:49 +0800
committerJhih-Ming Huang <jm.huang@cobinhood.com>2019-05-06 10:44:03 +0800
commit9a9898d77ac53dcff5b3855ff8e04249d1bdfa58 (patch)
tree61202193decd4346d63945d3dd7fab8e2df6f40f
parent644aa8c56a97b913d5a3ca4c5aca14ea988de15a (diff)
downloaddexon-9a9898d77ac53dcff5b3855ff8e04249d1bdfa58.tar
dexon-9a9898d77ac53dcff5b3855ff8e04249d1bdfa58.tar.gz
dexon-9a9898d77ac53dcff5b3855ff8e04249d1bdfa58.tar.bz2
dexon-9a9898d77ac53dcff5b3855ff8e04249d1bdfa58.tar.lz
dexon-9a9898d77ac53dcff5b3855ff8e04249d1bdfa58.tar.xz
dexon-9a9898d77ac53dcff5b3855ff8e04249d1bdfa58.tar.zst
dexon-9a9898d77ac53dcff5b3855ff8e04249d1bdfa58.zip
core: vm: sqlvm: revert Tuple structure (#193)
-rw-r--r--core/vm/sqlvm/runtime/instructions.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/vm/sqlvm/runtime/instructions.go b/core/vm/sqlvm/runtime/instructions.go
index 7ebfd2a8b..53ee990ce 100644
--- a/core/vm/sqlvm/runtime/instructions.go
+++ b/core/vm/sqlvm/runtime/instructions.go
@@ -2,6 +2,7 @@ package runtime
import (
"fmt"
+ "math/big"
"strings"
"github.com/dexon-foundation/dexon/core/vm/sqlvm/ast"
@@ -28,14 +29,14 @@ type Raw struct {
MajorType ast.DataTypeMajor
MinorType ast.DataTypeMinor
- // for not bytes
- Value interface{}
+ Value *big.Int
+ Bytes []byte
}
func (r *Raw) String() string {
return fmt.Sprintf(
- "MajorType: %v, MinorType: %v, Value: %v",
- r.MajorType, r.MinorType, r.Value)
+ "MajorType: %v, MinorType: %v, Value: %v, Bytes :%v",
+ r.MajorType, r.MinorType, r.Value, r.Bytes)
}
// Tuple is collection of Raw.