Skip to content

Commit

Permalink
chore(staking-rewards): update mock
Browse files Browse the repository at this point in the history
  • Loading branch information
ukint-vs committed Mar 18, 2024
1 parent c917943 commit f69bea2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pallets/staking-rewards/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use crate::{self as pallet_gear_staking_rewards, CurrencyOf};
use core::marker::PhantomData;
use frame_election_provider_support::{
bounds::{ElectionBounds, ElectionBoundsBuilder},
onchain, ElectionDataProvider, SequentialPhragmen, VoteWeight,
};
use frame_support::{
Expand Down Expand Up @@ -233,6 +234,7 @@ parameter_types! {
pub const MaxElectableTargets: u16 = 10_000;
pub const MaxOnChainElectingVoters: u32 = 500;
pub const MaxOnChainElectableTargets: u16 = 100;
pub static ElectionsBounds: ElectionBounds = ElectionBoundsBuilder::default().build();
}

frame_election_provider_support::generate_solution_type!(
Expand All @@ -252,12 +254,10 @@ impl<T: frame_system::Config + pallet_staking::Config> onchain::Config for OnCha
type DataProvider = pallet_staking::Pallet<T>;
type WeightInfo = ();
type MaxWinners = MaxActiveValidators;
type VotersBound = MaxOnChainElectingVoters;
type TargetsBound = MaxOnChainElectableTargets;
type Bounds = ElectionBounds;
}

impl pallet_staking::Config for Test {
type MaxNominations = MaxNominations;
type Currency = Balances;
type UnixTime = Timestamp;
type CurrencyBalance = <Self as pallet_balances::Config>::Balance;
Expand All @@ -279,6 +279,7 @@ impl pallet_staking::Config for Test {
type OffendingValidatorsThreshold = OffendingValidatorsThreshold;
type VoterList = BagsList;
type TargetList = pallet_staking::UseValidatorsMap<Self>;
type NominationsQuota = WeightedNominationsQuota<16>;
type MaxUnlockingChunks = ConstU32<32>;
type HistoryDepth = HistoryDepth;
type EventListeners = ();
Expand Down Expand Up @@ -430,9 +431,8 @@ impl multi_phase::Config for Test {
type Fallback = onchain::OnChainExecution<OnChainSeqPhragmen<Self>>;
type GovernanceFallback = onchain::OnChainExecution<OnChainSeqPhragmen<Self>>;
type ForceOrigin = frame_system::EnsureRoot<AccountId>;
type MaxElectableTargets = MaxElectableTargets;
type MaxWinners = MaxActiveValidators;
type MaxElectingVoters = MaxElectingVoters;
type ElectionBounds = ElectionBounds;
type WeightInfo = ();
type BenchmarkingConfig = TestBenchmarkingConfig;
type MinerConfig = Self;
Expand Down

0 comments on commit f69bea2

Please sign in to comment.