executor

package
Version: v1.65.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: BSD-3-Clause Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// KeyPrefixPing ping 前缀
	KeyPrefixPing = "mavl-echo-ping:%s"
	// KeyPrefixPang pang 前缀
	KeyPrefixPang = "mavl-echo-pang:%s"

	// KeyPrefixPingLocal local ping 前缀
	KeyPrefixPingLocal = "LODB-echo-ping:%s"
	// KeyPrefixPangLocal local pang 前缀
	KeyPrefixPangLocal = "LODB-echo-pang:%s"
)

Functions

func Init

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

Init 本执行器的初始化动作,向系统注册本执行器,这里生效高度暂写为0

func InitExecType

func InitExecType()

InitExecType 初始化时通过反射获取本执行器的方法列表

Types

type Echo

type Echo struct {
	dapp.DriverBase
}

Echo 定义执行器对象

func (*Echo) CheckTx

func (h *Echo) CheckTx(tx *types.Transaction, index int) error

CheckTx 本执行器不做任何校验

func (*Echo) ExecDelLocal_Pang

func (h *Echo) ExecDelLocal_Pang(ping *echotypes.Pang, tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecDelLocal_Pang 交易执行成功,将本消息对应的数值减1

func (*Echo) ExecDelLocal_Ping

func (h *Echo) ExecDelLocal_Ping(ping *echotypes.Ping, tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecDelLocal_Ping 交易执行成功,将本消息对应的数值减1

func (*Echo) ExecLocal_Pang

func (h *Echo) ExecLocal_Pang(ping *echotypes.Pang, tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Pang 交易执行成功,将本消息对应的数值加1

func (*Echo) ExecLocal_Ping

func (h *Echo) ExecLocal_Ping(ping *echotypes.Ping, tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Ping 交易执行成功,将本消息对应的数值加1

func (*Echo) Exec_Pang

func (h *Echo) Exec_Pang(ping *echotypes.Pang, tx *types.Transaction, index int) (*types.Receipt, error)

Exec_Pang 执行 pang 类型交易

func (*Echo) Exec_Ping

func (h *Echo) Exec_Ping(ping *echotypes.Ping, tx *types.Transaction, index int) (*types.Receipt, error)

Exec_Ping 执行 ping 类型交易

func (*Echo) GetDriverName

func (h *Echo) GetDriverName() string

GetDriverName 返回本执行器驱动名称

func (*Echo) Query_GetPang

func (h *Echo) Query_GetPang(in *echotypes.Query) (types.Message, error)

Query_GetPang 查询 pang 次数

func (*Echo) Query_GetPing

func (h *Echo) Query_GetPing(in *echotypes.Query) (types.Message, error)

Query_GetPing 查询 ping 次数

Jump to

Keyboard shortcuts

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