From 32deb605a09adf28ba30319b06a4197a2d048ef7 Mon Sep 17 00:00:00 2001 From: "polka.dom" Date: Fri, 10 May 2024 17:28:08 -0400 Subject: [PATCH] Remove `pallet::getter` usage from authority-discovery pallet (#4091) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As per #3326, removes pallet::getter usage from the pallet authority-discovery. The syntax `StorageItem::::get()` should be used instead. cc @muraca --------- Co-authored-by: Liam Aharon Co-authored-by: Bastian Köcher --- prdoc/pr_4091.prdoc | 15 +++++++++++++++ substrate/frame/authority-discovery/src/lib.rs | 2 -- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 prdoc/pr_4091.prdoc diff --git a/prdoc/pr_4091.prdoc b/prdoc/pr_4091.prdoc new file mode 100644 index 000000000000..5c38a344bd8a --- /dev/null +++ b/prdoc/pr_4091.prdoc @@ -0,0 +1,15 @@ +# 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 the authority-discovery pallet + +doc: + - audience: Runtime Dev + description: | + This PR removed `pallet::getter`s from `pallet-authority-discovery`s storage items. + When accessed inside the pallet, use the syntax `StorageItem::::get()`. + When accessed outside the pallet, use the getters current_authorities() and next_authorities() instead. + +crates: + - name: pallet-authority-discovery + bump: major diff --git a/substrate/frame/authority-discovery/src/lib.rs b/substrate/frame/authority-discovery/src/lib.rs index ed9240d99e8d..16f71960d693 100644 --- a/substrate/frame/authority-discovery/src/lib.rs +++ b/substrate/frame/authority-discovery/src/lib.rs @@ -48,13 +48,11 @@ pub mod pallet { } #[pallet::storage] - #[pallet::getter(fn keys)] /// Keys of the current authority set. pub(super) type Keys = StorageValue<_, WeakBoundedVec, ValueQuery>; #[pallet::storage] - #[pallet::getter(fn next_keys)] /// Keys of the next authority set. pub(super) type NextKeys = StorageValue<_, WeakBoundedVec, ValueQuery>;