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-03-26 17:48:21 +0800
commit42e3ffa730a99e2ab62966459e3ff4439c46aeae (patch)
tree403afff686434f4aa8beeb213c610108f7fb6fa5
parent1fca05efa62853d1ed512a73d9f58af703d474aa (diff)
downloaddexon-42e3ffa730a99e2ab62966459e3ff4439c46aeae.tar
dexon-42e3ffa730a99e2ab62966459e3ff4439c46aeae.tar.gz
dexon-42e3ffa730a99e2ab62966459e3ff4439c46aeae.tar.bz2
dexon-42e3ffa730a99e2ab62966459e3ff4439c46aeae.tar.lz
dexon-42e3ffa730a99e2ab62966459e3ff4439c46aeae.tar.xz
dexon-42e3ffa730a99e2ab62966459e3ff4439c46aeae.tar.zst
dexon-42e3ffa730a99e2ab62966459e3ff4439c46aeae.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.