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 marks this element as accepted
Accept() error
// Reject marks this element as rejected
Reject() error
// Status returns the current status
Status() Status
}
Decidable represents an element that can be decided
type Preference ¶
type Preference struct {
// Status is the current status
Status Status
// DualCert indicates if both BLS and RT certificates are present
DualCert bool
}
Preference returns the preferred status
type Quasar ¶
type Quasar interface {
Decidable
// SetQuantum marks this element as having quantum-secure finality
SetQuantum() error
// HasDualCert returns true if both BLS and RT certificates are present
HasDualCert() bool
}
Quasar extends Decidable with quantum-secure finality
type Status ¶
type Status uint32
Status represents the current status of a block or vertex
const ( // Unknown means the status is not known Unknown Status = iota // Processing means the block is being processed Processing // Rejected means the block was rejected Rejected // Accepted means the block was accepted with dual certificates Accepted // Quantum means the block has quantum-secure finality Quantum )
func (Status) IsAccepted ¶
IsAccepted returns true if the block was accepted
type TestDecidable ¶
type TestDecidable struct {
IDV string
StatusV Status
PreferenceV Preference
}
TestDecidable is a test interface for decidable blocks
func (*TestDecidable) Accept ¶
func (t *TestDecidable) Accept() error
func (*TestDecidable) ID ¶
func (t *TestDecidable) ID() string
func (*TestDecidable) Reject ¶
func (t *TestDecidable) Reject() error
func (*TestDecidable) SetQuantum ¶
func (t *TestDecidable) SetQuantum() error
func (*TestDecidable) Status ¶
func (t *TestDecidable) Status() Status
Click to show internal directories.
Click to hide internal directories.