controller

package
v0.0.0-...-7640ebf Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: BSD-3-Clause Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *vm.VM

Types

type Controller

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

func (*Controller) Accepted

func (c *Controller) Accepted(ctx context.Context, blk *chain.StatelessBlock) error

func (*Controller) Genesis

func (c *Controller) Genesis() *genesis.Genesis

func (*Controller) GetAssetFromState

func (c *Controller) GetAssetFromState(
	ctx context.Context,
	asset ids.ID,
) (bool, []byte, uint64, crypto.PublicKey, bool, error)

func (*Controller) GetBalanceFromState

func (c *Controller) GetBalanceFromState(
	ctx context.Context,
	pk crypto.PublicKey,
	asset ids.ID,
) (uint64, error)

func (*Controller) GetLoanFromState

func (c *Controller) GetLoanFromState(
	ctx context.Context,
	asset ids.ID,
	destination ids.ID,
) (uint64, error)

func (*Controller) GetTransaction

func (c *Controller) GetTransaction(
	ctx context.Context,
	txID ids.ID,
) (bool, int64, bool, uint64, error)

func (*Controller) Initialize

func (c *Controller) Initialize(
	inner *vm.VM,
	snowCtx *snow.Context,
	gatherer ametrics.MultiGatherer,
	genesisBytes []byte,
	upgradeBytes []byte,
	configBytes []byte,
) (
	vm.Config,
	vm.Genesis,
	builder.Builder,
	gossiper.Gossiper,
	database.Database,
	database.Database,
	vm.Handlers,
	chain.ActionRegistry,
	chain.AuthRegistry,
	error,
)

func (*Controller) Logger

func (c *Controller) Logger() logging.Logger

func (*Controller) Orders

func (c *Controller) Orders(pair string, limit int) []*orderbook.Order

func (*Controller) Rejected

func (*Controller) Rules

func (c *Controller) Rules(t int64) chain.Rules

func (*Controller) Shutdown

func (*Controller) Shutdown(context.Context) error

func (*Controller) StateManager

func (c *Controller) StateManager() chain.StateManager

func (*Controller) Tracer

func (c *Controller) Tracer() trace.Tracer

type StateManager

type StateManager struct{}

func (*StateManager) HeightKey

func (*StateManager) HeightKey() []byte

func (*StateManager) IncomingWarpKey

func (*StateManager) IncomingWarpKey(sourceChainID ids.ID, msgID ids.ID) []byte

func (*StateManager) OutgoingWarpKey

func (*StateManager) OutgoingWarpKey(txID ids.ID) []byte

Jump to

Keyboard shortcuts

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