executor

package
v1.76.4 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: BSD-3-Clause Imports: 4 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

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