Documentation
¶
Index ¶
- type VM
- func (vm *VM) BuildBlock(ctx context.Context) (chain.Block, error)
- func (vm *VM) Connected(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error
- func (vm *VM) Disconnected(ctx context.Context, nodeID ids.NodeID) error
- func (vm *VM) GetBlock(ctx context.Context, blkID ids.ID) (chain.Block, error)
- func (vm *VM) GetBlockIDAtHeight(ctx context.Context, height uint64) (ids.ID, error)
- func (vm *VM) HealthCheck(ctx context.Context) (block.HealthCheckResult, error)
- func (vm *VM) Initialize(ctx context.Context, init vm.Init) error
- func (vm *VM) LastAccepted(ctx context.Context) (ids.ID, error)
- func (vm *VM) NewHTTPHandler(ctx context.Context) (http.Handler, error)
- func (vm *VM) ParseBlock(ctx context.Context, b []byte) (chain.Block, error)
- func (vm *VM) SetPreference(ctx context.Context, blkID ids.ID) error
- func (vm *VM) SetState(ctx context.Context, state uint32) error
- func (vm *VM) Shutdown(ctx context.Context) error
- func (vm *VM) Version(ctx context.Context) (string, error)
- func (vm *VM) WaitForEvent(ctx context.Context) (block.Message, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VM ¶
type VM struct {
IsPlugin bool
}
VM implements the Snowman ChainVM interface for the C-Chain
func (*VM) BuildBlock ¶
BuildBlock builds a new block
func (*VM) Connected ¶ added in v1.16.39
func (vm *VM) Connected(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error
Connected is called when a new node is connected
func (*VM) Disconnected ¶ added in v1.16.39
Disconnected is called when a node is disconnected
func (*VM) GetBlockIDAtHeight ¶ added in v0.15.4
GetBlockIDAtHeight returns the block ID at a specific height
func (*VM) HealthCheck ¶ added in v0.15.4
HealthCheck returns health status of the VM
func (*VM) Initialize ¶
Initialize implements the snowman.ChainVM interface
func (*VM) LastAccepted ¶
LastAccepted returns the ID of the last accepted block
func (*VM) NewHTTPHandler ¶ added in v0.15.5
NewHTTPHandler returns the HTTP handlers for the VM
func (*VM) ParseBlock ¶
ParseBlock parses a block from bytes
func (*VM) SetPreference ¶
SetPreference sets the preferred block
Click to show internal directories.
Click to hide internal directories.