diff --git a/pallets/parachain-staking/src/benchmarks.rs b/pallets/parachain-staking/src/benchmarks.rs index 2a998022c0..19277038cf 100644 --- a/pallets/parachain-staking/src/benchmarks.rs +++ b/pallets/parachain-staking/src/benchmarks.rs @@ -52,7 +52,6 @@ const MGA_TOKEN_ID: TokenId = 0u32; /// Any set of tokens x, x0=0, will have token_id, (3x+5, 3x+6) <=> 3x+7 /// Since we are creating new tokens every time we can simply just use (v, v+1) as the pooled token amounts, to mint v liquidity tokens - /// Mint v liquidity tokens of token set x to funding account fn create_non_staking_liquidity_for_funding( v: Option, @@ -121,7 +120,9 @@ fn create_3rdparty_reward_token_for_funding( v.into(), )?; - let token = as MultiTokenCurrencyExtended>::create(&funding_account, (v + 1u128).into())?; + let token = as MultiTokenCurrencyExtended< + T::AccountId, + >>::create(&funding_account, (v + 1u128).into())?; assert!(>::create_pool( funding_account.clone(), @@ -1701,9 +1702,6 @@ benchmarks! { active_session_change { - - // number of 3rdparty rewards schedules running - // let c in 3..150; // number of native rewrds (promoted pools) // let x in 3..100; // candidate_count @@ -1722,9 +1720,6 @@ benchmarks! { let z = <::MaxDelegatorsPerCandidate as Get>::get(); // // Total selected candidates let w = <::MinSelectedCandidates as Get>::get() + 1u32; - // - // number of 3rdparty schedules - let c = 200; assert_ok!(>::finalize_tge(RawOrigin::Root.into())); assert_ok!(>::init_issuance_config(RawOrigin::Root.into())); @@ -1750,25 +1745,6 @@ benchmarks! { >::enable(created_liquidity_token, 1); } - for id in 0..c { - let liquidity_amount = 100_000; - let liquidity_token = create_non_staking_liquidity_for_funding::(Some(liquidity_amount)).unwrap(); - - let pool = (liquidity_token - 2, liquidity_token - 1); - - log::info!("3rdparty_liq_token: {:?} : {:?}", liquidity_token, pool); - - let reward_amount = 100_000_000*DOLLAR; - let reward_token = create_3rdparty_reward_token_for_funding::(Some(reward_amount)).unwrap(); - log::info!("rewards_token: {:?}", reward_token); - - let (user, _, _) = create_funded_user::("3rdparty_reward", id as u32, liquidity_token, Some(liquidity_amount)); - let (user, _, _) = create_funded_user::("3rdparty_reward", id as u32, reward_token, Some(reward_amount)); - - T::RewardsApi::enable_3rdparty_rewards(user.clone(), pool, reward_token, 10, reward_amount); - T::RewardsApi::activate_liquidity_for_3rdparty_rewards(user, liquidity_token, liquidity_amount, reward_token); - } - // Now to prepare the liquidity token we will use for collator and delegators let created_liquidity_token = create_staking_liquidity_for_funding::(Some( ((z*(y+1)) as u128 *100*DOLLAR)+ T::MinCandidateStk::get()*DOLLAR)).unwrap(); assert_ok!(Pallet::::add_staking_liquidity_token(RawOrigin::Root.into(), PairedOrLiquidityToken::Liquidity(created_liquidity_token), x)); diff --git a/pallets/parachain-staking/src/lib.rs b/pallets/parachain-staking/src/lib.rs index a6b136c69a..51361e0d9d 100644 --- a/pallets/parachain-staking/src/lib.rs +++ b/pallets/parachain-staking/src/lib.rs @@ -62,12 +62,12 @@ //! -------------# Aggregator A #------------- //! | # # | //! | #################### | -//! | | | -//! | | | -//! | | | -//! | | | -//! | | | -//! | | | +//! | | | +//! | | | +//! | | | +//! | | | +//! | | | +//! | | | //! -------------------- -------------------- -------------------- //! | Candidate B | | Candidate C | | Candidate D | //! | token: MGX:TUR | | token: MGX:IMBU | | token: MGX:MOVR |