Documentation ¶
Index ¶
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 SubnetValidator ¶
type SubnetValidator struct { Validator `serialize:"true"` // ID of the subnet this validator is validating Subnet ids.ID `serialize:"true" json:"subnetID"` }
SubnetValidator validates a subnet on the Lux network.
func (*SubnetValidator) SubnetID ¶
func (v *SubnetValidator) SubnetID() ids.ID
SubnetID is the ID of the subnet this validator is validating
func (*SubnetValidator) Verify ¶
func (v *SubnetValidator) Verify() error
Verify this validator is valid
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.