aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJM <jm@dexon.org>2019-02-15 16:43:33 +0800
committerJhih-Ming Huang <jm.huang@cobinhood.com>2019-03-26 17:48:21 +0800
commit77648c442fc13211c3b65229e420471290fcd935 (patch)
treecd5c83de9a4745fcde6d3052b67eee5f6573a877
parent42e3ffa730a99e2ab62966459e3ff4439c46aeae (diff)
downloaddexon-77648c442fc13211c3b65229e420471290fcd935.tar.gz
dexon-77648c442fc13211c3b65229e420471290fcd935.tar.zst
dexon-77648c442fc13211c3b65229e420471290fcd935.zip
core: vm: sqlvm: export instruction's member (#197)
-rw-r--r--core/vm/sqlvm/runtime/instructions.go6
-rw-r--r--core/vm/sqlvm/runtime/runtime.go6
2 files changed, 6 insertions, 6 deletions
diff --git a/core/vm/sqlvm/runtime/instructions.go b/core/vm/sqlvm/runtime/instructions.go
index 53ee990ce..b5d98f956 100644
--- a/core/vm/sqlvm/runtime/instructions.go
+++ b/core/vm/sqlvm/runtime/instructions.go
@@ -18,9 +18,9 @@ type OpFunction func(ctx *common.Context, ops []*Operand, registers []*Operand,
// Instruction represents single instruction with essential information
// collection.
type Instruction struct {
- op OpCode
- input []*Operand
- output int
+ Op OpCode
+ Input []*Operand
+ Output int
}
// Raw with embedded big.Int value or byte slice which represents the real value
diff --git a/core/vm/sqlvm/runtime/runtime.go b/core/vm/sqlvm/runtime/runtime.go
index ebb4d4579..3ea12f119 100644
--- a/core/vm/sqlvm/runtime/runtime.go
+++ b/core/vm/sqlvm/runtime/runtime.go
@@ -8,12 +8,12 @@ import (
// Run is runtime entrypoint.
func Run(stateDB vm.StateDB, ins []Instruction, registers []*Operand) (ret []byte, err error) {
for _, in := range ins {
- opFunc := jumpTable[in.op]
- err = opFunc(&common.Context{}, in.input, registers, in.output)
+ opFunc := jumpTable[in.Op]
+ err = opFunc(&common.Context{}, in.Input, registers, in.Output)
if err != nil {
return nil, err
}
}
- // TODO: ret = ABIEncode(ins[len(ins)-1].output)
+ // TODO: ret = ABIEncode(ins[len(ins)-1].Output)
return
}