processor

package
v3.0.0-alpha.0...-c9bb4b0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: GPL-3.0 Imports: 13 Imported by: 18

Documentation

Index

Constants

View Source
const (
	DuplicationTypeSender   types.DuplicationType = "sender"
	DuplicationTypeCurrency types.DuplicationType = "currency"
	DuplicationTypeContract types.DuplicationType = "contract"
)

Variables

This section is empty.

Functions

func CheckDuplication

func CheckDuplication(opr *OperationProcessor, op base.Operation) error

func DuplicationKey

func DuplicationKey(key string, duplType types.DuplicationType) string

Types

type GetLastBlockFunc

type GetLastBlockFunc func() (base.BlockMap, bool, error)

type OperationProcessor

type OperationProcessor struct {
	// id string
	sync.RWMutex
	*logging.Logging
	*base.BaseOperationProcessor

	Duplicated map[string]struct{}

	GetStateFunc         base.GetStateFunc
	CollectFee           func(*OperationProcessor, types.AddFee) error
	CheckDuplicationFunc func(*OperationProcessor, base.Operation) error
	GetNewProcessorFunc  func(*OperationProcessor, base.Operation) (base.OperationProcessor, bool, error)
	// contains filtered or unexported fields
}

func NewOperationProcessor

func NewOperationProcessor() *OperationProcessor

func (*OperationProcessor) Cancel

func (opr *OperationProcessor) Cancel() error

func (*OperationProcessor) CheckNewAddressDuplication

func (opr *OperationProcessor) CheckNewAddressDuplication(as []base.Address) error

func (*OperationProcessor) Close

func (opr *OperationProcessor) Close() error

func (*OperationProcessor) GetNewProcessorFromHintset

func (opr *OperationProcessor) GetNewProcessorFromHintset(op base.Operation) (base.OperationProcessor, error)

func (*OperationProcessor) New

func (opr *OperationProcessor) New(
	height base.Height,
	getStateFunc base.GetStateFunc,
	newPreProcessConstraintFunc base.NewOperationProcessorProcessFunc,
	newProcessConstraintFunc base.NewOperationProcessorProcessFunc) (*OperationProcessor, error)

func (*OperationProcessor) PreProcess

func (*OperationProcessor) Process

func (*OperationProcessor) SetCheckDuplicationFunc

func (opr *OperationProcessor) SetCheckDuplicationFunc(
	f func(*OperationProcessor, base.Operation) error,
) error

func (*OperationProcessor) SetGetNewProcessorFunc

func (opr *OperationProcessor) SetGetNewProcessorFunc(
	f func(*OperationProcessor, base.Operation) (base.OperationProcessor, bool, error),
) error

func (*OperationProcessor) SetProcessor

func (opr *OperationProcessor) SetProcessor(
	hint hint.Hint,
	newProcessor types.GetNewProcessor,
) error

Jump to

Keyboard shortcuts

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