state

package
v1.22.41 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: BSD-3-Clause Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrVertexNotFound = &vertexNotFoundError{}

ErrVertexNotFound is returned when vertex not found

Functions

This section is empty.

Types

type State

type State interface {
	// GetVertex gets a vertex
	GetVertex(ids.ID) (Vertex, error)

	// AddVertex adds a vertex
	AddVertex(Vertex) error

	// VertexIssued checks if vertex issued
	VertexIssued(Vertex) bool

	// IsProcessing checks if processing
	IsProcessing(ids.ID) bool
}

State represents DAG state

func New

func New() State

New creates a new state

type Vertex

type Vertex interface {
	ID() ids.ID
	ParentIDs() []ids.ID
	Height() uint64
	Bytes() []byte
}

Vertex represents a DAG vertex

Jump to

Keyboard shortcuts

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