state

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2020 License: BSD-3-Clause Imports: 19 Imported by: 0

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

This section is empty.

Types

type ID

type ID uint32

ID is an identifier for a codec

const (
	NoID ID = iota
	GenericID
	CustomID
)

Codec types

func (ID) String

func (c ID) String() string

func (ID) Verify

func (c ID) Verify() error

Verify that the codec is a known codec value. Returns nil if the codec is valid.

type Serializer

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

Serializer manages the state of multiple vertices

func (*Serializer) BuildVertex

func (s *Serializer) BuildVertex(parentSet ids.Set, txs []snowstorm.Tx) (avacon.Vertex, error)

BuildVertex implements the avalanche.State interface

func (*Serializer) Edge

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

Edge implements the avalanche.State interface

func (*Serializer) GetVertex

func (s *Serializer) GetVertex(vtxID ids.ID) (avacon.Vertex, error)

GetVertex implements the avalanche.State interface

func (*Serializer) Initialize

func (s *Serializer) Initialize(ctx *snow.Context, vm avaeng.DAGVM, db database.Database)

Initialize implements the avalanche.State interface

func (*Serializer) ParseVertex

func (s *Serializer) ParseVertex(b []byte) (avacon.Vertex, error)

ParseVertex implements the avalanche.State interface

Jump to

Keyboard shortcuts

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