Versions in this module Expand all Collapse all v0 v0.1.0 Apr 19, 2020 Changes in this version + type Block struct + PrntID ids.ID + VM *SnowmanVM + func NewBlock(parentID ids.ID) *Block + func (b *Block) Accept() + func (b *Block) Initialize(bytes []byte, vm *SnowmanVM) + func (b *Block) Parent() snowman.Block + func (b *Block) ParentID() ids.ID + func (b *Block) Reject() + 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 + State SnowmanState + ToEngine chan<- common.Message + 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 + func (svm *SnowmanVM) NewHandler(name string, service interface{}, lockOption ...common.LockOption) *common.HTTPHandler + 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() + func (svm *SnowmanVM) SetPreference(ID ids.ID) + func (svm *SnowmanVM) Shutdown()