types

package
v1.68.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package types 管理插件相关的定义

Index

Constants

View Source
const (

	// TyCommitDelayTxAction commit delay transaction action id
	TyCommitDelayTxAction = iota + 101

	// UnknownActionName 存证类型交易
	UnknownActionName = "notary"
	// NameCommitDelayTxAction commit delay transaction action name
	NameCommitDelayTxAction = "CommitDelayTx"
)

action类型id和name,这些常量可以自定义修改

View Source
const (
	// TyCommitDelayTxLog commit delay transaction log  id
	TyCommitDelayTxLog = iota + 100

	// NameCommitDelayTxLog commit delay transaction log name
	NameCommitDelayTxLog = "CommitDelayTxLog"
)

log类型id值

View Source
const (
	// ForkUseTimeDelay use block time as delay type, instead of block height
	ForkUseTimeDelay = "ForkUseTimeDelay"
)

fork

View Source
const (

	// QueryGetDelayTxInfo query func name
	QueryGetDelayTxInfo = "GetDelayTxInfo"
)

query func name

Variables

View Source
var (
	// NoneX driver name
	NoneX = "none"
)

Functions

func ActionName added in v1.67.4

func ActionName(tx *types.Transaction) string

ActionName return action a string name

func InitExecutor

func InitExecutor(cfg *types.Chain33Config)

InitExecutor init Executor

func InitFork

func InitFork(cfg *types.Chain33Config)

InitFork init

Types

type CommitDelayTx

type CommitDelayTx struct {

	//延时交易, 16进制格式
	DelayTx string `protobuf:"bytes,1,opt,name=delayTx,proto3" json:"delayTx,omitempty"`
	//Deprecated:区块高度类型延时, 建议使用时间类型延时
	RelativeDelayHeight int64 `protobuf:"varint,2,opt,name=relativeDelayHeight,proto3" json:"relativeDelayHeight,omitempty"`
	//相对延时时长, 单位秒
	RelativeDelayTime int64 `protobuf:"varint,3,opt,name=relativeDelayTime,proto3" json:"relativeDelayTime,omitempty"`
	// contains filtered or unexported fields
}

提交延时交易类型

func (*CommitDelayTx) Descriptor deprecated

func (*CommitDelayTx) Descriptor() ([]byte, []int)

Deprecated: Use CommitDelayTx.ProtoReflect.Descriptor instead.

func (*CommitDelayTx) GetDelayTx

func (x *CommitDelayTx) GetDelayTx() string

func (*CommitDelayTx) GetRelativeDelayHeight

func (x *CommitDelayTx) GetRelativeDelayHeight() int64

func (*CommitDelayTx) GetRelativeDelayTime added in v1.67.4

func (x *CommitDelayTx) GetRelativeDelayTime() int64

func (*CommitDelayTx) ProtoMessage

func (*CommitDelayTx) ProtoMessage()

func (*CommitDelayTx) ProtoReflect

func (x *CommitDelayTx) ProtoReflect() protoreflect.Message

func (*CommitDelayTx) Reset

func (x *CommitDelayTx) Reset()

func (*CommitDelayTx) String

func (x *CommitDelayTx) String() string

type CommitDelayTxLog

type CommitDelayTxLog struct {

	// 提交者
	Submitter string `protobuf:"bytes,1,opt,name=submitter,proto3" json:"submitter,omitempty"`
	// 延时交易哈希
	DelayTxHash string `protobuf:"bytes,2,opt,name=delayTxHash,proto3" json:"delayTxHash,omitempty"`
	// Deprecated:延时开始区块高度, 建议使用时间类型
	DelayBeginHeight int64 `protobuf:"varint,3,opt,name=delayBeginHeight,proto3" json:"delayBeginHeight,omitempty"`
	// 延时开始区块时间戳
	DelayBeginTimestamp int64 `protobuf:"varint,4,opt,name=delayBeginTimestamp,proto3" json:"delayBeginTimestamp,omitempty"`
	// contains filtered or unexported fields
}

提交延时交易回执

func (*CommitDelayTxLog) Descriptor deprecated

func (*CommitDelayTxLog) Descriptor() ([]byte, []int)

Deprecated: Use CommitDelayTxLog.ProtoReflect.Descriptor instead.

func (*CommitDelayTxLog) GetDelayBeginHeight

func (x *CommitDelayTxLog) GetDelayBeginHeight() int64

func (*CommitDelayTxLog) GetDelayBeginTimestamp added in v1.67.4

func (x *CommitDelayTxLog) GetDelayBeginTimestamp() int64

func (*CommitDelayTxLog) GetDelayTxHash

func (x *CommitDelayTxLog) GetDelayTxHash() string

func (*CommitDelayTxLog) GetSubmitter

func (x *CommitDelayTxLog) GetSubmitter() string

func (*CommitDelayTxLog) ProtoMessage

func (*CommitDelayTxLog) ProtoMessage()

func (*CommitDelayTxLog) ProtoReflect

func (x *CommitDelayTxLog) ProtoReflect() protoreflect.Message

func (*CommitDelayTxLog) Reset

func (x *CommitDelayTxLog) Reset()

func (*CommitDelayTxLog) String

func (x *CommitDelayTxLog) String() string

type NoneAction

type NoneAction struct {

	// Types that are assignable to Value:
	//	*NoneAction_CommitDelayTx
	Value isNoneAction_Value `protobuf_oneof:"value"`
	Ty    int32              `protobuf:"varint,2,opt,name=Ty,proto3" json:"Ty,omitempty"`
	// contains filtered or unexported fields
}

func (*NoneAction) Descriptor deprecated

func (*NoneAction) Descriptor() ([]byte, []int)

Deprecated: Use NoneAction.ProtoReflect.Descriptor instead.

func (*NoneAction) GetCommitDelayTx

func (x *NoneAction) GetCommitDelayTx() *CommitDelayTx

func (*NoneAction) GetTy

func (x *NoneAction) GetTy() int32

func (*NoneAction) GetValue

func (m *NoneAction) GetValue() isNoneAction_Value

func (*NoneAction) ProtoMessage

func (*NoneAction) ProtoMessage()

func (*NoneAction) ProtoReflect

func (x *NoneAction) ProtoReflect() protoreflect.Message

func (*NoneAction) Reset

func (x *NoneAction) Reset()

func (*NoneAction) String

func (x *NoneAction) String() string

type NoneAction_CommitDelayTx

type NoneAction_CommitDelayTx struct {
	CommitDelayTx *CommitDelayTx `protobuf:"bytes,1,opt,name=commitDelayTx,proto3,oneof"`
}

type NoneType

type NoneType struct {
	types.ExecTypeBase
}

NoneType defines NoneType

func NewType

func NewType(cfg *types.Chain33Config) *NoneType

NewType new a NoneType object

func (*NoneType) ActionName

func (n *NoneType) ActionName(tx *types.Transaction) string

ActionName return action a string name

func (*NoneType) DecodePayloadValue added in v1.67.1

func (n *NoneType) DecodePayloadValue(tx *types.Transaction) (string, reflect.Value, error)

DecodePayloadValue decode payload value

func (*NoneType) GetLogMap

func (n *NoneType) GetLogMap() map[int64]*types.LogInfo

GetLogMap get log for map

func (*NoneType) GetName

func (n *NoneType) GetName() string

GetName reset name

func (*NoneType) GetPayload

func (n *NoneType) GetPayload() types.Message

GetPayload return manageaction

func (NoneType) GetTypeMap

func (n NoneType) GetTypeMap() map[string]int32

GetTypeMap return typename of actionname

Jump to

Keyboard shortcuts

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