diff --git a/pallets/proof-of-stake/src/lib.rs b/pallets/proof-of-stake/src/lib.rs index 19e325613c..d188f86523 100644 --- a/pallets/proof-of-stake/src/lib.rs +++ b/pallets/proof-of-stake/src/lib.rs @@ -488,7 +488,7 @@ pub mod pallet { #[transactional] #[pallet::call_index(4)] // NOTE: implement benchmark - #[pallet::weight(<::WeightInfo>::claim_rewards_all())] + #[pallet::weight(<::WeightInfo>::reward_pool())] pub fn reward_pool( origin: OriginFor, pool: (TokenId, TokenId), @@ -568,7 +568,7 @@ pub mod pallet { /// be taken from available balance #[transactional] #[pallet::call_index(5)] - #[pallet::weight(<::WeightInfo>::activate_liquidity())] + #[pallet::weight(<::WeightInfo>::activate_liquidity_for_rewards_schedule())] pub fn activate_liquidity_for_rewards_schedule( origin: OriginFor, liquidity_token_id: TokenId, @@ -595,7 +595,7 @@ pub mod pallet { /// - use_balance_from - where from tokens should be used #[transactional] #[pallet::call_index(6)] - #[pallet::weight(<::WeightInfo>::activate_liquidity())] + #[pallet::weight(<::WeightInfo>::deactivate_liquidity_for_rewards_schedule())] pub fn deactivate_liquidity_for_rewards_schedule( origin: OriginFor, liquidity_token_id: TokenId, diff --git a/pallets/proof-of-stake/src/weights.rs b/pallets/proof-of-stake/src/weights.rs index 49e10aa4c8..024cc3133e 100644 --- a/pallets/proof-of-stake/src/weights.rs +++ b/pallets/proof-of-stake/src/weights.rs @@ -59,6 +59,9 @@ pub trait WeightInfo { fn update_pool_promotion() -> Weight; fn activate_liquidity() -> Weight; fn deactivate_liquidity() -> Weight; + fn deactivate_liquidity_for_rewards_schedule() -> Weight; + fn activate_liquidity_for_rewards_schedule() -> Weight; + fn reward_pool() -> Weight; } // For backwards compatibility and tests @@ -97,4 +100,22 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + + fn deactivate_liquidity_for_rewards_schedule() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn activate_liquidity_for_rewards_schedule() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } + + fn reward_pool() -> Weight { + (Weight::from_parts(118_250_000, 0)) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + } }