From eb6091fa420bac814193ab70e5bbbf35b7cc1323 Mon Sep 17 00:00:00 2001 From: "polka.dom" Date: Fri, 17 May 2024 17:07:57 -0400 Subject: [PATCH 1/4] Create prdoc --- prdoc/pr_9999.prdoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 prdoc/pr_9999.prdoc diff --git a/prdoc/pr_9999.prdoc b/prdoc/pr_9999.prdoc new file mode 100644 index 000000000000..dab6cab30347 --- /dev/null +++ b/prdoc/pr_9999.prdoc @@ -0,0 +1,14 @@ +# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 +# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json + +title: Removed `pallet::getter` usage from pallet-fast-unstake + +doc: + - audience: Runtime Dev + description: | + This PR removed the `pallet::getter`s from `pallet-fast-unstake`. + The syntax `StorageItem::::get()` should be used instead. + +crates: + - name: pallet-fast-unstake + bump: major From e954abafc4c4ac820870a8109748bb2c11781adf Mon Sep 17 00:00:00 2001 From: "polka.dom" Date: Fri, 17 May 2024 17:10:35 -0400 Subject: [PATCH 2/4] turbo time --- substrate/frame/fast-unstake/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/substrate/frame/fast-unstake/src/lib.rs b/substrate/frame/fast-unstake/src/lib.rs index 8ba306201310..336d76cefd25 100644 --- a/substrate/frame/fast-unstake/src/lib.rs +++ b/substrate/frame/fast-unstake/src/lib.rs @@ -141,7 +141,7 @@ macro_rules! log { ($level:tt, $patter:expr $(, $values:expr)* $(,)?) => { log::$level!( target: crate::LOG_TARGET, - concat!("[{:?}] 💨 ", $patter), >::block_number() $(, $values)* + concat!("[{:?}] 💨 ", $patter), frame_system::Pallet::::block_number() $(, $values)* ) }; } @@ -332,7 +332,7 @@ pub mod pallet { pub fn register_fast_unstake(origin: OriginFor) -> DispatchResult { let ctrl = ensure_signed(origin)?; - ensure!(ErasToCheckPerBlock::::get() != 0, >::CallNotAllowed); + ensure!(ErasToCheckPerBlock::::get() != 0, Error::::CallNotAllowed); let stash_account = T::Staking::stash_by_ctrl(&ctrl).map_err(|_| Error::::NotController)?; ensure!(!Queue::::contains_key(&stash_account), Error::::AlreadyQueued); @@ -373,7 +373,7 @@ pub mod pallet { pub fn deregister(origin: OriginFor) -> DispatchResult { let ctrl = ensure_signed(origin)?; - ensure!(ErasToCheckPerBlock::::get() != 0, >::CallNotAllowed); + ensure!(ErasToCheckPerBlock::::get() != 0, Error::::CallNotAllowed); let stash_account = T::Staking::stash_by_ctrl(&ctrl).map_err(|_| Error::::NotController)?; From bd0034307025519de30a5b6065214d1abab9b57d Mon Sep 17 00:00:00 2001 From: "polka.dom" Date: Fri, 17 May 2024 17:52:22 -0400 Subject: [PATCH 3/4] Remove eras to check per block getter --- substrate/frame/fast-unstake/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/substrate/frame/fast-unstake/src/lib.rs b/substrate/frame/fast-unstake/src/lib.rs index 336d76cefd25..f31c9c640260 100644 --- a/substrate/frame/fast-unstake/src/lib.rs +++ b/substrate/frame/fast-unstake/src/lib.rs @@ -227,7 +227,6 @@ pub mod pallet { /// checked. The checking is represented by updating [`UnstakeRequest::checked`], which is /// stored in [`Head`]. #[pallet::storage] - #[pallet::getter(fn eras_to_check_per_block)] pub type ErasToCheckPerBlock = StorageValue<_, u32, ValueQuery>; #[pallet::event] From 79675bcccb49d97e491a95c39d3e35584a4ae1f6 Mon Sep 17 00:00:00 2001 From: "polka.dom" Date: Fri, 17 May 2024 18:17:02 -0400 Subject: [PATCH 4/4] Update prdoc number --- prdoc/{pr_9999.prdoc => pr_4514.prdoc} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename prdoc/{pr_9999.prdoc => pr_4514.prdoc} (100%) diff --git a/prdoc/pr_9999.prdoc b/prdoc/pr_4514.prdoc similarity index 100% rename from prdoc/pr_9999.prdoc rename to prdoc/pr_4514.prdoc