state

package
v1.8.0-rc.8 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: BSD-3-Clause Imports: 18 Imported by: 6

Documentation

Overview

Package state manages the meta-data required by consensus for an avalanche dag.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSerializer added in v1.7.8

func NewSerializer(config SerializerConfig) vertex.Manager

Types

type Serializer

type Serializer struct {
	SerializerConfig
	// contains filtered or unexported fields
}

Serializer manages the state of multiple vertices

func (*Serializer) BuildStopVtx added in v1.7.4

func (s *Serializer) BuildStopVtx(parentIDs []ids.ID) (avalanche.Vertex, error)

func (*Serializer) BuildVtx added in v1.3.2

func (s *Serializer) BuildVtx(parentIDs []ids.ID, txs []snowstorm.Tx) (avalanche.Vertex, error)

func (*Serializer) Edge

func (s *Serializer) Edge() []ids.ID

func (*Serializer) GetVtx added in v1.3.2

func (s *Serializer) GetVtx(vtxID ids.ID) (avalanche.Vertex, error)

func (*Serializer) ParseVtx added in v1.3.2

func (s *Serializer) ParseVtx(b []byte) (avalanche.Vertex, error)

func (*Serializer) StopVertexAccepted added in v1.7.14

func (s *Serializer) StopVertexAccepted() (bool, error)

type SerializerConfig added in v1.7.8

type SerializerConfig struct {
	ChainID             ids.ID
	VM                  vertex.DAGVM
	DB                  database.Database
	Log                 logging.Logger
	XChainMigrationTime time.Time
}

Jump to

Keyboard shortcuts

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