Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decidable ¶
type Decidable interface {
// ID returns the unique ID of this element.
ID() string
// Accept this element.
Accept() error
// Reject this element.
Reject() error
// Status returns the current status of this element.
Status() Status
}
Decidable represents an element that can be decided.
type Status ¶
type Status uint32
Status represents the current status of a block or vertex
const ( // Unknown indicates the status is not known Unknown Status = iota // Processing indicates the element is being processed Processing // Accepted indicates the element was accepted Accepted // Rejected indicates the element was rejected Rejected // Dropped indicates the element was dropped Dropped // Quantum indicates the element is in quantum consensus state Quantum )
func (Status) MarshalJSON ¶ added in v1.14.2
MarshalJSON marshals the status as a string.
type TestDecidable ¶
TestDecidable is a test implementation of Decidable.
func (*TestDecidable) Accept ¶
func (d *TestDecidable) Accept() error
func (*TestDecidable) ID ¶
func (d *TestDecidable) ID() string
func (*TestDecidable) Reject ¶
func (d *TestDecidable) Reject() error
func (*TestDecidable) Status ¶
func (d *TestDecidable) Status() Status
Click to show internal directories.
Click to hide internal directories.