Skip to main content

ValidatorsDecisionState

Represents the state of a validators decision during the voting process.

Hierarchy

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: UInt32 = UInt32

Count of votes in favor

decision

decision: ValidatorsDecision = ValidatorsDecision

The validators' decision

hashSum

hashSum: Field = Field

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

staticmerge

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.