state

package
v1.13.20 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSerializer added in v0.15.6

func NewSerializer(config SerializerConfig) vertex.Manager

Types

type Serializer added in v0.15.6

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

Serializer manages the state of multiple vertices

func (*Serializer) BuildStopVtx added in v0.15.6

func (s *Serializer) BuildStopVtx(
	ctx context.Context,
	parentIDs []ids.ID,
) (dag.Vertex, error)

func (*Serializer) Edge added in v0.15.6

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

func (*Serializer) GetVtx added in v0.15.6

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

func (*Serializer) ParseVtx added in v0.15.6

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

func (*Serializer) StopVertexAccepted added in v0.15.6

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

type SerializerConfig added in v0.15.6

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

Jump to

Keyboard shortcuts

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