From 9a9898d77ac53dcff5b3855ff8e04249d1bdfa58 Mon Sep 17 00:00:00 2001 From: JM Date: Wed, 13 Feb 2019 16:11:49 +0800 Subject: core: vm: sqlvm: revert Tuple structure (#193) --- core/vm/sqlvm/runtime/instructions.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core/vm/sqlvm') 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. -- cgit v1.2.3