Skip to content

Commit

Permalink
Remove OldOutcomeInfo and related structs
Browse files Browse the repository at this point in the history
  • Loading branch information
saboonikhil committed Jun 9, 2024
1 parent 259a766 commit 175f44b
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions zrml/global-disputes/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,35 +93,6 @@ pub enum GdStatus<BlockNumber> {
Destroyed,
}

// TODO(#986): to remove after the storage migration

/// The information about a voting outcome of a global dispute.
#[derive(Debug, TypeInfo, Decode, Encode, MaxEncodedLen, Clone, PartialEq, Eq)]
pub struct OldOutcomeInfo<Balance, OwnerInfo> {
/// The current sum of all locks on this outcome.
pub outcome_sum: Balance,
/// The vector of owners of the outcome.
pub owners: OwnerInfo,
}

/// The information about the current highest winning outcome.
#[derive(TypeInfo, Decode, Encode, MaxEncodedLen, Clone, PartialEq, Eq)]
pub struct OldWinnerInfo<Balance, OwnerInfo> {
/// The outcome, which is in the lead.
pub outcome: OutcomeReport,
/// The information about the winning outcome.
pub outcome_info: OldOutcomeInfo<Balance, OwnerInfo>,
/// Check, if the global dispute is finished.
pub is_finished: bool,
}

impl<Balance: Saturating, OwnerInfo: Default> OldWinnerInfo<Balance, OwnerInfo> {
pub fn new(outcome: OutcomeReport, vote_sum: Balance) -> Self {
let outcome_info = OldOutcomeInfo { outcome_sum: vote_sum, owners: Default::default() };
OldWinnerInfo { outcome, is_finished: false, outcome_info }
}
}

/// An initial vote outcome item with the outcome owner and the initial vote amount.
pub struct InitialItem<AccountId, Balance> {
/// The outcome which is added as initial global dispute vote possibility.
Expand Down

0 comments on commit 175f44b

Please sign in to comment.