vertex

package
v1.22.21 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DAGVM

type DAGVM interface {
	ParseVertex(context.Context, []byte) (Vertex, error)
	BuildVertex(context.Context) (Vertex, error)
}

DAGVM represents a DAG-based VM

type Manager

type Manager interface {
	GetVertex(ids.ID) (Vertex, error)
	AddVertex(Vertex) error
}

Manager manages vertices

type Parser

type Parser interface {
	ParseVertex([]byte) (Vertex, error)
}

Parser parses vertices

type Storage

type Storage interface {
	GetVertex(ids.ID) (Vertex, error)
	PutVertex(Vertex) error
}

Storage stores vertices

type Vertex

type Vertex interface {
	ID() ids.ID
	Bytes() []byte
	Height() uint64
	Epoch() uint32
	Parents() []ids.ID
	Txs() []ids.ID
	Status() choices.Status
	Accept(context.Context) error
	Reject(context.Context) error
	Verify(context.Context) error
}

Vertex represents a vertex in the DAG

Directories

Path Synopsis
Package vertexmock provides mock implementations for DAG vertices
Package vertexmock provides mock implementations for DAG vertices

Jump to

Keyboard shortcuts

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