Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Ranked Collective: constructor for MemberRecord #13473

Merged
merged 1 commit into from
Feb 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions frame/ranked-collective/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,13 @@ pub struct MemberRecord {
rank: Rank,
}

impl MemberRecord {
// Constructs a new instance of [`MemberRecord`].
pub fn new(rank: Rank) -> Self {
Self { rank }
}
}

/// Record needed for every vote.
#[derive(PartialEq, Eq, Clone, Copy, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)]
pub enum VoteRecord {
Expand Down