controller

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *vm.VM

Types

type BalanceArgs

type BalanceArgs struct {
	Address string `json:"address"`
}

type BalanceReply

type BalanceReply struct {
	Exists   bool   `json:"exists"`
	Unlocked uint64 `json:"unlocked"`
	Locked   uint64 `json:"locked"`
}

type ContentArgs

type ContentArgs struct {
	Content ids.ID `json:"content"`
}

type ContentReply

type ContentReply struct {
	Searcher string `json:"searcher"`
	Royalty  uint64 `json:"royalty"`
}

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) 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,
	vm.KVDatabase,
	database.Database,
	vm.Handlers,
	chain.ActionRegistry,
	chain.AuthRegistry,
	error,
)

func (*Controller) Rejected

func (*Controller) Rules

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

type GenesisReply

type GenesisReply struct {
	Genesis *genesis.Genesis `json:"genesis"`
}

type GetTxArgs

type GetTxArgs struct {
	TxID ids.ID `json:"txId"`
}

type GetTxReply

type GetTxReply struct {
	Accepted bool `json:"accepted"`

	Timestamp int64  `json:"timestamp"`
	Success   bool   `json:"success"`
	Units     uint64 `json:"units"`
}

type Handler

type Handler struct {
	*vm.Handler // embed standard functionality
	// contains filtered or unexported fields
}

func (*Handler) Balance

func (h *Handler) Balance(req *http.Request, args *BalanceArgs, reply *BalanceReply) error

func (*Handler) Content

func (h *Handler) Content(req *http.Request, args *ContentArgs, reply *ContentReply) error

func (*Handler) Genesis

func (h *Handler) Genesis(_ *http.Request, _ *struct{}, reply *GenesisReply) (err error)

func (*Handler) GetTx

func (h *Handler) GetTx(req *http.Request, args *GetTxArgs, reply *GetTxReply) error

Jump to

Keyboard shortcuts

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