controller

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: BSD-3-Clause Imports: 27 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

TODO I can add the blocks to the JSON RPC Server here instead of REST API

func (*Controller) Genesis

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

func (*Controller) GetAcceptedBlockWindow added in v0.9.7

func (c *Controller) GetAcceptedBlockWindow() int

func (*Controller) GetAssetFromState

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

func (*Controller) GetBalanceFromState

func (c *Controller) GetBalanceFromState(
	ctx context.Context,
	pk ed25519.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, chain.Dimensions, 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,
	map[uint8]vm.AuthEngine,
	error,
)

func (*Controller) Logger

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

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) Submit added in v0.8.0

func (c *Controller) Submit(
	ctx context.Context,
	verifySig bool,
	txs []*chain.Transaction,
) (errs []error)

func (*Controller) Tracer

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

func (*Controller) UnitPrices added in v0.8.0

func (c *Controller) UnitPrices(ctx context.Context) (chain.Dimensions, error)

type StateManager

type StateManager struct{}

func (*StateManager) FeeKey added in v0.3.0

func (*StateManager) FeeKey() []byte

func (*StateManager) HeightKey

func (*StateManager) HeightKey() []byte

func (*StateManager) IncomingWarpKeyPrefix added in v0.3.0

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

func (*StateManager) OutgoingWarpKeyPrefix added in v0.3.0

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

func (*StateManager) TimestampKey added in v0.3.0

func (*StateManager) TimestampKey() []byte

Jump to

Keyboard shortcuts

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