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 DAGVM ¶ added in v1.22.46
type DAGVM interface {
// ParseVtx parses a vertex from bytes
ParseVtx(ctx context.Context, bytes []byte) (Vertex, error)
}
DAGVM is the interface for a DAG-based virtual machine
type Manager ¶ added in v1.22.46
type Manager interface {
State
// ParseVtx parses a vertex from bytes
ParseVtx(ctx context.Context, bytes []byte) (Vertex, error)
// GetVtx returns a vertex by ID
GetVtx(ctx context.Context, vtxID ids.ID) (Vertex, error)
// Edge returns the current edge of the DAG
Edge(ctx context.Context) []ids.ID
// StopVertexAccepted marks a vertex as no longer accepted
StopVertexAccepted()
}
Manager extends State with vertex management capabilities
func NewSerializer ¶ added in v1.22.46
func NewSerializer(config SerializerConfig) Manager
NewSerializer creates a new vertex serializer/manager
type SerializerConfig ¶ added in v1.22.46
SerializerConfig configures the vertex serializer
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
Click to show internal directories.
Click to hide internal directories.