Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pallet::getter usage from authority-discovery pallet #4091

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions prdoc/pr_4091.prdoc
Original file line number Diff line number Diff line change
@@ -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::<T, I>::get()`.
When accessed outside the pallet, use the getters current_authorities() and next_authorities() instead.

crates:
- name: pallet-authority-discovery
PolkadotDom marked this conversation as resolved.
Show resolved Hide resolved
bump: major
2 changes: 0 additions & 2 deletions substrate/frame/authority-discovery/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,11 @@ pub mod pallet {
}

#[pallet::storage]
#[pallet::getter(fn keys)]
/// Keys of the current authority set.
pub(super) type Keys<T: Config> =
StorageValue<_, WeakBoundedVec<AuthorityId, T::MaxAuthorities>, ValueQuery>;

#[pallet::storage]
#[pallet::getter(fn next_keys)]
/// Keys of the next authority set.
pub(super) type NextKeys<T: Config> =
StorageValue<_, WeakBoundedVec<AuthorityId, T::MaxAuthorities>, ValueQuery>;
Expand Down
Loading