common

package
v0.18.15 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlockBeginner txblock = 1
	BlockEnder    txblock = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerRouter

type ControllerRouter interface {
	Add(txblock, func(interface{})) error
	Iterate(txblock) ([]func(interface{}), error)
}

ControllerRouter interface supplies functionality to add a function to the blockender and blockbeginner

type ExtAppData

type ExtAppData struct {
	// we need txs, data stores, services, block functions
	ChainState    *storage.ChainState
	ExtTxs        []ExtTx
	ExtStores     map[string]data.ExtStore
	ExtServiceMap ExtServiceMap
	ExtBlockFuncs FunctionRouter
}

func LoadExtAppData

func LoadExtAppData(cs *storage.ChainState) *ExtAppData

type ExtParam

type ExtParam struct {
	InternalTxStore *transactions.TransactionStore
	Logger          *log.Logger
	ActionCtx       action.Context
	Validator       keys.Address
	Header          abci.Header
	Deliver         *storage.State
}

type ExtServiceMap

type ExtServiceMap map[string]interface{}

func NewExtServiceMap

func NewExtServiceMap() ExtServiceMap

type ExtTx

type ExtTx struct {
	Tx  action.Tx
	Msg action.Msg
}

type FunctionRouter

type FunctionRouter struct {
	// contains filtered or unexported fields
}

func NewFunctionRouter

func NewFunctionRouter() FunctionRouter

func (FunctionRouter) Add

func (r FunctionRouter) Add(t txblock, i func(interface{})) error

func (FunctionRouter) Iterate

func (r FunctionRouter) Iterate(t txblock) ([]func(interface{}), error)

type HandlerList

type HandlerList []func(*ExtAppData)
var Handlers HandlerList

func (*HandlerList) Register

func (h *HandlerList) Register(fn func(*ExtAppData))

Jump to

Keyboard shortcuts

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