executor

package
v1.66.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2022 License: BSD-3-Clause Imports: 15 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExecSymbol

func GetExecSymbol(order *pt.SellOrder) (string, string)

GetExecSymbol : return exec, symbol

func GetName

func GetName() string

GetName : 获取trade合约名字

func Init

func Init(name string, cfg *types.Chain33Config, sub []byte)

Init : 注册当前trade合约

func InitExecType

func InitExecType()

InitExecType ...

func NewOrderTable

func NewOrderTable(kvdb dbm.KV) *table.Table

NewOrderTable create order table

func NewOrderTableV2

func NewOrderTableV2(kvdb dbm.KV) *table.Table

NewOrderTableV2 create order table

func UpgradeLocalDBPart1

func UpgradeLocalDBPart1(localDB dbm.KVDB) ([]*types.KeyValue, error)

UpgradeLocalDBPart1 手动生成KV,需要在原有数据库中删除

func UpgradeLocalDBPart2

func UpgradeLocalDBPart2(kvdb dbm.KVDB, coinExec, coinSymbol string) ([]*types.KeyValue, error)

UpgradeLocalDBPart2 升级order order 从 v1 升级到 v2 通过tableV1 删除, 通过tableV2 添加, 无需通过每个区块扫描对应的交易

func UpgradeLocalDBV2

func UpgradeLocalDBV2(localDB dbm.KVDB, coinExec, coinSymbol string) (*types.LocalDBSet, error)

UpgradeLocalDBV2 trade 本地数据库升级 from 1 to 2

Types

type OrderRow

type OrderRow struct {
	*pty.LocalOrder
}

OrderRow order row

func NewOrderRow

func NewOrderRow() *OrderRow

NewOrderRow create row

func (*OrderRow) CreateRow

func (r *OrderRow) CreateRow() *table.Row

CreateRow create row

func (*OrderRow) Get

func (r *OrderRow) Get(key string) ([]byte, error)

Get get index key

func (*OrderRow) SetPayload

func (r *OrderRow) SetPayload(data types.Message) error

SetPayload set payload

type OrderV2Row

type OrderV2Row struct {
	*pty.LocalOrder
}

OrderV2Row order row

func NewOrderV2Row

func NewOrderV2Row() *OrderV2Row

NewOrderV2Row create row

func (*OrderV2Row) CreateRow

func (r *OrderV2Row) CreateRow() *table.Row

CreateRow create row

func (*OrderV2Row) Get

func (r *OrderV2Row) Get(key string) ([]byte, error)

Get get index key

func (*OrderV2Row) SetPayload

func (r *OrderV2Row) SetPayload(data types.Message) error

SetPayload set payload

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL