Skip to content

Commit

Permalink
Naming
Browse files Browse the repository at this point in the history
  • Loading branch information
olegnn committed Apr 12, 2024
1 parent 2721b7b commit 5add9aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions substrate/frame/elections-phragmen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1457,22 +1457,22 @@ mod tests {
type Identity = ();

fn identity(account: &AccountId) -> Option<Self::Identity> {
ValidCandidates::<Test>::get(account)
CandidateIdentities::<Test>::get(account)
}
}

impl IdentitySetter<Test> for CandidateIdentityProvider<Test> {
type IdentityInfo = ();

fn set_identity(account: AccountId, (): ()) -> DispatchResult {
ValidCandidates::<Test>::insert(account, ());
CandidateIdentities::<Test>::insert(account, ());

Ok(())
}

fn remove_identity(account: &AccountId) -> DispatchResult {
ensure!(
ValidCandidates::<Test>::take(account).is_some(),
CandidateIdentities::<Test>::take(account).is_some(),
IdentityDoestExist
);

Expand All @@ -1481,7 +1481,7 @@ mod tests {
}

#[storage_alias]
pub type ValidCandidates<T: Config> = StorageMap<
pub type CandidateIdentities<T: Config> = StorageMap<
Pallet<T>,
Twox64Concat,
<Test as frame_system::Config>::AccountId,
Expand Down

0 comments on commit 5add9aa

Please sign in to comment.