state

package
v1.8.13 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: BSD-3-Clause Imports: 20 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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(
	ctx context.Context,
	parentIDs []ids.ID,
) (avalanche.Vertex, error)

func (*Serializer) BuildVtx

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

func (*Serializer) Edge

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

func (*Serializer) GetVtx

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

func (*Serializer) ParseVtx

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

func (*Serializer) StopVertexAccepted

func (s *Serializer) StopVertexAccepted(ctx context.Context) (bool, error)

type SerializerConfig

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