Documentation
¶
Index ¶
- type VM
- func (vm *VM) BuildBlock(ctx context.Context) (block.Block, error)
- func (vm *VM) Connected(ctx context.Context, nodeID ids.NodeID, nodeVersion interface{}) error
- func (vm *VM) Disconnected(ctx context.Context, nodeID ids.NodeID) error
- func (vm *VM) GetBlock(ctx context.Context, blkID ids.ID) (block.Block, error)
- func (vm *VM) GetBlockIDAtHeight(ctx context.Context, height uint64) (ids.ID, error)
- func (vm *VM) HealthCheck(ctx context.Context) (interface{}, error)
- func (vm *VM) Initialize(ctx context.Context, chainCtx interface{}, db interface{}, genesisBytes []byte, ...) error
- func (vm *VM) LastAccepted(ctx context.Context) (ids.ID, error)
- func (vm *VM) NewHTTPHandler(ctx context.Context) (interface{}, error)
- func (vm *VM) ParseBlock(ctx context.Context, b []byte) (block.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) (interface{}, 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) 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 ¶
func (vm *VM) Initialize( ctx context.Context, chainCtx interface{}, db interface{}, genesisBytes []byte, upgradeBytes []byte, configBytes []byte, msgChan interface{}, fxs []interface{}, appSender interface{}, ) error
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.