Skip to content

Commit

Permalink
use btreemap instead of hashmap
Browse files Browse the repository at this point in the history
  • Loading branch information
Leouarz committed Oct 19, 2024
1 parent a6283f9 commit 3c24e10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pallets/fusion/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod traits;
mod types;
mod weights;

use std::collections::HashMap;
use sp_std::collections::btree_map::BTreeMap;

use crate::types::*;
use frame_support::{
Expand Down Expand Up @@ -2445,7 +2445,7 @@ impl<T: Config> FusionExt<T::AccountId, BalanceOf<T>> for Pallet<T> {
}

fn cancel_fusion_slash(era: EraIndex, slash_validators: &Vec<T::AccountId>) {
let mut slashes_to_cancel: HashMap<PoolId, Vec<T::AccountId>> = HashMap::new();
let mut slashes_to_cancel: BTreeMap<PoolId, Vec<T::AccountId>> = BTreeMap::new();
for slash_validator in slash_validators {
let concerned_pools_ids = FusionPoolsFromValidator::<T>::get(era, slash_validator);
for pool_id in concerned_pools_ids {
Expand Down

0 comments on commit 3c24e10

Please sign in to comment.