executor

package
v1.75.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: BSD-3-Clause Imports: 16 Imported by: 6 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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