aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJhih-Ming Huang <jm.huang@cobinhood.com>2019-02-12 18:08:35 +0800
committerJhih-Ming Huang <jm.huang@cobinhood.com>2019-02-19 12:12:40 +0800
commite442487342468f9c8e49d823185375018cea7dd0 (patch)
tree3e70ec4fa6d4e75f4446daf15b02d104637e702e
parent3e82873e391d34e4a319556cc840c5ce145d8558 (diff)
downloaddexon-e442487342468f9c8e49d823185375018cea7dd0.tar
dexon-e442487342468f9c8e49d823185375018cea7dd0.tar.gz
dexon-e442487342468f9c8e49d823185375018cea7dd0.tar.bz2
dexon-e442487342468f9c8e49d823185375018cea7dd0.tar.lz
dexon-e442487342468f9c8e49d823185375018cea7dd0.tar.xz
dexon-e442487342468f9c8e49d823185375018cea7dd0.tar.zst
dexon-e442487342468f9c8e49d823185375018cea7dd0.zip
core: vm: sqlvm: modify Tuple.Data.Value type
Modify Tuple.Data.Value type from *big.Int to interface{} and remove Max, Min.
-rw-r--r--core/vm/sqlvm/runtime/instructions.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/core/vm/sqlvm/runtime/instructions.go b/core/vm/sqlvm/runtime/instructions.go
index f642a2515..7ebfd2a8b 100644
--- a/core/vm/sqlvm/runtime/instructions.go
+++ b/core/vm/sqlvm/runtime/instructions.go
@@ -2,7 +2,6 @@ package runtime
import (
"fmt"
- "math/big"
"strings"
"github.com/dexon-foundation/dexon/core/vm/sqlvm/ast"
@@ -30,16 +29,13 @@ type Raw struct {
MinorType ast.DataTypeMinor
// for not bytes
- Value *big.Int
- Max, Min *big.Int
- // for bytes
- Bytes []byte
+ Value interface{}
}
func (r *Raw) String() string {
return fmt.Sprintf(
- "MajorType: %v, MinorType: %v, Value: %v, Bytes: %v",
- r.MajorType, r.MinorType, r.Value, r.Bytes)
+ "MajorType: %v, MinorType: %v, Value: %v",
+ r.MajorType, r.MinorType, r.Value)
}
// Tuple is collection of Raw.