diff options
author | JM <jm@dexon.org> | 2019-02-15 16:43:33 +0800 |
---|---|---|
committer | Jhih-Ming Huang <jm.huang@cobinhood.com> | 2019-05-06 10:44:03 +0800 |
commit | 762c0baf7f42ebd3bdfbc408112351894ff555b5 (patch) | |
tree | 4e9f91e865f1b841fb5b79bc8ca2271b186d460b /core/vm/sqlvm | |
parent | 9a9898d77ac53dcff5b3855ff8e04249d1bdfa58 (diff) | |
download | dexon-762c0baf7f42ebd3bdfbc408112351894ff555b5.tar dexon-762c0baf7f42ebd3bdfbc408112351894ff555b5.tar.gz dexon-762c0baf7f42ebd3bdfbc408112351894ff555b5.tar.bz2 dexon-762c0baf7f42ebd3bdfbc408112351894ff555b5.tar.lz dexon-762c0baf7f42ebd3bdfbc408112351894ff555b5.tar.xz dexon-762c0baf7f42ebd3bdfbc408112351894ff555b5.tar.zst dexon-762c0baf7f42ebd3bdfbc408112351894ff555b5.zip |
core: vm: sqlvm: export instruction's member (#197)
Diffstat (limited to 'core/vm/sqlvm')
-rw-r--r-- | core/vm/sqlvm/runtime/instructions.go | 6 | ||||
-rw-r--r-- | core/vm/sqlvm/runtime/runtime.go | 6 |
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 } |