From c31814176f7c3a8711f8e3cb23f5ef1e46200356 Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Thu, 20 Apr 2023 19:25:12 +0000 Subject: [PATCH] style(pallet-inflation): deprecation warnings --- --- a/pallets/inflation/src/lib.rs +++ b/pallets/inflation/src/lib.rs @@ -118,7 +118,7 @@ let block_interval: u32 = T::InflationBlockInterval::get().try_into().unwrap_or(0); let current_relay_block = T::BlockNumberProvider::current_block_number(); let next_inflation: T::BlockNumber = >::get(); - add_weight(1, 0, Weight::from_ref_time(5_000_000)); + add_weight(1, 0, Weight::from_parts(5_000_000, 0)); // Apply inflation every InflationBlockInterval blocks // If next_inflation == 0, this means inflation wasn't yet initialized @@ -130,7 +130,7 @@ add_weight(1, 0, Weight::zero()); if current_relay_block >= next_recalculation { Self::recalculate_inflation(next_recalculation); - add_weight(0, 4, Weight::from_ref_time(5_000_000)); + add_weight(0, 4, Weight::from_parts(5_000_000, 0)); } T::Currency::deposit_into_existing( @@ -142,7 +142,7 @@ // Update inflation block >::set(next_inflation + block_interval.into()); - add_weight(3, 3, Weight::from_ref_time(10_000_000)); + add_weight(3, 3, Weight::from_parts(10_000_000, 0)); } consumed_weight -- gitstuff