From 7fc3eecfe61033f6a6a2ee63af392b38b2c60a2b Mon Sep 17 00:00:00 2001 From: Greg Zaitsev Date: Fri, 10 Dec 2021 10:50:59 +0000 Subject: [PATCH] Fix formatting --- --- a/pallets/inflation/src/lib.rs +++ b/pallets/inflation/src/lib.rs @@ -77,8 +77,7 @@ /// Relay block when inflation has started #[pallet::storage] - pub type StartBlock = - StorageValue; + pub type StartBlock = StorageValue; #[pallet::hooks] impl Hooks> for Pallet { @@ -173,9 +172,10 @@ impl Pallet { pub fn recalculate_inflation(recalculation_block: T::BlockNumber) { - let current_year: u32 = ((recalculation_block - >::get()) / T::BlockNumber::from(YEAR)) - .try_into() - .unwrap_or(0); + let current_year: u32 = ((recalculation_block - >::get()) + / T::BlockNumber::from(YEAR)) + .try_into() + .unwrap_or(0); let block_interval: u32 = T::InflationBlockInterval::get().try_into().unwrap_or(0); let one_percent = Perbill::from_percent(1); --- a/pallets/inflation/src/tests.rs +++ b/pallets/inflation/src/tests.rs @@ -241,7 +241,10 @@ MockBlockNumberProvider::set(start_block); // Start inflation as sudo - assert_ok!(Inflation::start_inflation(RawOrigin::Root.into(), start_block)); + assert_ok!(Inflation::start_inflation( + RawOrigin::Root.into(), + start_block + )); // Go through all the block inflations for year 1, // total issuance will be updated accordingly -- gitstuff