Type Alias ElectionProviderMultiPhaseEvent

ElectionProviderMultiPhaseEvent: Enum<{
    ElectionFailed: undefined;
    ElectionFinalized: {
        compute: ElectionProviderMultiPhaseElectionCompute;
        score: {
            minimal_stake: bigint;
            sum_stake: bigint;
            sum_stake_squared: bigint;
        };
    };
    PhaseTransitioned: {
        from: ElectionProviderMultiPhasePhase;
        round: number;
        to: ElectionProviderMultiPhasePhase;
    };
    Rewarded: {
        account: SS58String;
        value: bigint;
    };
    Slashed: {
        account: SS58String;
        value: bigint;
    };
    SolutionStored: {
        compute: ElectionProviderMultiPhaseElectionCompute;
        origin?: SS58String;
        prev_ejected: boolean;
    };
}>

Type declaration

  • ElectionFailed: undefined

    An election failed.

    Not much can be said about which computes failed in the process.

  • ElectionFinalized: {
        compute: ElectionProviderMultiPhaseElectionCompute;
        score: {
            minimal_stake: bigint;
            sum_stake: bigint;
            sum_stake_squared: bigint;
        };
    }

    The election has been finalized, with the given computation and score.

    • compute: ElectionProviderMultiPhaseElectionCompute
    • score: {
          minimal_stake: bigint;
          sum_stake: bigint;
          sum_stake_squared: bigint;
      }
      • minimal_stake: bigint
      • sum_stake: bigint
      • sum_stake_squared: bigint
  • PhaseTransitioned: {
        from: ElectionProviderMultiPhasePhase;
        round: number;
        to: ElectionProviderMultiPhasePhase;
    }

    There was a phase transition in a given round.

  • Rewarded: {
        account: SS58String;
        value: bigint;
    }

    An account has been rewarded for their signed submission being finalized.

    • account: SS58String
    • value: bigint
  • Slashed: {
        account: SS58String;
        value: bigint;
    }

    An account has been slashed for submitting an invalid signed submission.

    • account: SS58String
    • value: bigint
  • SolutionStored: {
        compute: ElectionProviderMultiPhaseElectionCompute;
        origin?: SS58String;
        prev_ejected: boolean;
    }

    A solution was stored with the given compute.

    The origin indicates the origin of the solution. If origin is Some(AccountId), the stored solution was submitted in the signed phase by a miner with the AccountId. Otherwise, the solution was stored either during the unsigned phase or by T::ForceOrigin. The bool is true when a previous solution was ejected to make room for this one.