state

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSerializer

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

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

func (*Serializer) BuildVtx

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

func (*Serializer) Edge

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

func (*Serializer) GetVtx

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

func (*Serializer) ParseVtx

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

type SerializerConfig

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

Jump to

Keyboard shortcuts

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