ValidatorsDecisionState
Hierarchy
- { count: UInt32; decision: ValidatorsDecision; hashSum: Field }
- ValidatorsDecisionState
Index
Constructors
externalconstructor
Parameters
externalvalue: { count: UInt32; decision: ValidatorsDecision; hashSum: Field }
externalcount: UInt32 = UInt32
Count of votes in favor
externaldecision: ValidatorsDecision = ValidatorsDecision
The validators' decision
externalhashSum: Field = Field
Sum of the hashes of validators who have voted
Returns ValidatorsDecisionState
Properties
count
Count of votes in favor
decision
The validators' decision
hashSum
Sum of the hashes of validators who have voted
Methods
staticabstain
Records an abstention or vote against the decision by the given validator.
Parameters
decision: ValidatorsDecision
The validators' decision.
validatorAddress: PublicKey
The public key of the validator.
validatorsList: ValidatorsList
The ValidatorsList.
Returns ValidatorsDecisionState
A new
ValidatorsDecisionState
reflecting the abstention.
staticassertEquals
Asserts that two
ValidatorsDecisionState
instances are equal.Parameters
a: ValidatorsDecisionState
First
ValidatorsDecisionState
instance.b: ValidatorsDecisionState
Second
ValidatorsDecisionState
instance.
Returns void
staticmerge
Merges two
ValidatorsDecisionState
instances.Parameters
state1: ValidatorsDecisionState
The first decision state.
state2: ValidatorsDecisionState
The second decision state.
Returns ValidatorsDecisionState
A new
ValidatorsDecisionState
representing the combined state.
staticvote
Records a vote in favor of the decision by the given validator.
Parameters
decision: ValidatorsDecision
The validators' decision.
validatorAddress: PublicKey
The public key of the validator.
validatorsList: ValidatorsList
The ValidatorsList.
signature: Signature
The signature of the validator.
Returns ValidatorsDecisionState
A new
ValidatorsDecisionState
reflecting the vote.
Represents the state of a validators decision during the voting process.