Versions in this module Expand all Collapse all v0 v0.1.3 Jun 25, 2022 v0.1.0 Jun 25, 2022 Changes in this version + type Block struct + Hght uint64 + PrntID ids.ID + VM *SnowmanVM + func NewBlock(parentID ids.ID, height uint64) *Block + func (b *Block) Accept() error + func (b *Block) Height() uint64 + func (b *Block) Initialize(bytes []byte, vm *SnowmanVM) + func (b *Block) Parent() snowman.Block + func (b *Block) ParentID() ids.ID + func (b *Block) Reject() error + func (b *Block) Status() choices.Status + func (b *Block) Verify() (bool, error) + type Metadata struct + func (i *Metadata) Bytes() []byte + func (i *Metadata) ID() ids.ID + func (i *Metadata) Initialize(bytes []byte) + func (i *Metadata) SetStatus(status choices.Status) + func (i *Metadata) Status() choices.Status + type SnowmanState interface + GetBlock func(database.Database, ids.ID) (snowman.Block, error) + GetLastAccepted func(database.Database) (ids.ID, error) + PutBlock func(database.Database, snowman.Block) error + PutLastAccepted func(database.Database, ids.ID) error + func NewSnowmanState(unmarshalBlockFunc func([]byte) (snowman.Block, error)) (SnowmanState, error) + type SnowmanVM struct + Ctx *snow.Context + DB *versiondb.Database + LastAcceptedID ids.ID + State SnowmanState + ToEngine chan<- common.Message + func (svm *SnowmanVM) Bootstrapped() error + func (svm *SnowmanVM) Bootstrapping() error + func (svm *SnowmanVM) DBInitialized() bool + func (svm *SnowmanVM) GetBlock(id ids.ID) (snowman.Block, error) + func (svm *SnowmanVM) Initialize(ctx *snow.Context, db database.Database, ...) error + func (svm *SnowmanVM) LastAccepted() (ids.ID, error) + func (svm *SnowmanVM) NewHandler(name string, service interface{}, lockOption ...common.LockOption) (*common.HTTPHandler, error) + func (svm *SnowmanVM) NotifyBlockReady() + func (svm *SnowmanVM) ParseBlock(bytes []byte) (snowman.Block, error) + func (svm *SnowmanVM) Preferred() ids.ID + func (svm *SnowmanVM) SaveBlock(db database.Database, block snowman.Block) error + func (svm *SnowmanVM) SetDBInitialized() error + func (svm *SnowmanVM) SetPreference(id ids.ID) error + func (svm *SnowmanVM) Shutdown() error