Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrVertexNotFound = errors.New("vertex not found") ErrInvalidStatus = errors.New("invalid vertex status") )
Functions ¶
This section is empty.
Types ¶
type State ¶
type State interface {
// GetVertex returns a vertex by its ID
GetVertex(vertexID ids.ID) (Vertex, error)
// AddVertex adds a vertex to the state
AddVertex(vertex Vertex) error
// VertexStatus returns the status of a vertex
VertexStatus(vertexID ids.ID) choices.Status
// SetVertexStatus sets the status of a vertex
SetVertexStatus(vertexID ids.ID, status choices.Status) error
// Edge returns the directed edge from vertex u to vertex v
Edge(u, v ids.ID) bool
// Conflicts returns vertices that conflict with the given vertex
Conflicts(vertexID ids.ID) ([]ids.ID, error)
}
State manages vertex states for DAG consensus
Click to show internal directories.
Click to hide internal directories.