Documentation ¶
Index ¶
- Variables
- type AllychainValidator
- type EndTimeHeap
- func (h *EndTimeHeap) Add(validator *Validator)
- func (h *EndTimeHeap) Len() int
- func (h *EndTimeHeap) Less(i, j int) bool
- func (h *EndTimeHeap) Peek() *Validator
- func (h *EndTimeHeap) Pop() interface{}
- func (h *EndTimeHeap) Push(x interface{})
- func (h *EndTimeHeap) Remove() *Validator
- func (h *EndTimeHeap) Swap(i, j int)
- type Validator
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrWeightTooSmall = errors.New("weight of this validator is too low")
)
Functions ¶
This section is empty.
Types ¶
type AllychainValidator ¶ added in v0.1.5
type AllychainValidator struct { Validator `serialize:"true"` // ID of the allychain this validator is validating Allychain ids.ID `serialize:"true" json:"allychain"` }
AllychainValidator validates a allychain on the Axia network.
func (*AllychainValidator) AllychainID ¶ added in v0.1.5
func (v *AllychainValidator) AllychainID() ids.ID
AllychainID is the ID of the allychain this validator is validating
func (*AllychainValidator) Verify ¶ added in v0.1.5
func (v *AllychainValidator) Verify() error
Verify this validator is valid
type EndTimeHeap ¶
type EndTimeHeap []*Validator
EndTimeHeap orders validators by EndTime from earliest to latest.
func (*EndTimeHeap) Add ¶
func (h *EndTimeHeap) Add(validator *Validator)
func (*EndTimeHeap) Len ¶
func (h *EndTimeHeap) Len() int
func (*EndTimeHeap) Less ¶
func (h *EndTimeHeap) Less(i, j int) bool
func (*EndTimeHeap) Peek ¶
func (h *EndTimeHeap) Peek() *Validator
func (*EndTimeHeap) Pop ¶
func (h *EndTimeHeap) Pop() interface{}
func (*EndTimeHeap) Push ¶
func (h *EndTimeHeap) Push(x interface{})
func (*EndTimeHeap) Remove ¶
func (h *EndTimeHeap) Remove() *Validator
func (*EndTimeHeap) Swap ¶
func (h *EndTimeHeap) Swap(i, j int)
type Validator ¶
type Validator struct { // Node ID of the validator NodeID ids.NodeID `serialize:"true" json:"nodeID"` // Unix time this validator starts validating Start uint64 `serialize:"true" json:"start"` // Unix time this validator stops validating End uint64 `serialize:"true" json:"end"` // Weight of this validator used when sampling Wght uint64 `serialize:"true" json:"weight"` }
Validator is a validator.
func (*Validator) BoundedBy ¶
BoundedBy returns true iff the period that validator validates is a (non-strict) subset of the time that [other] validates. Namely, startTime <= v.StartTime() <= v.EndTime() <= endTime
func (*Validator) Duration ¶
Duration is the amount of time that this validator will be in the validator set
func (*Validator) StartTime ¶
StartTime is the time that this validator will enter the validator set
Click to show internal directories.
Click to hide internal directories.