Skip to content

Commit

Permalink
add prdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
runcomet committed Dec 1, 2024
1 parent fab0db6 commit c1c1023
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
13 changes: 13 additions & 0 deletions prdoc/pr_6619.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 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: migrate pallet-authority-discovery to umbrella crate

doc:
- audience: Runtime Dev
description: |
Imports frame umbrella crate systems into pallet-authority-discovery.

crates:
- name: pallet-authority-discovery
bump: minor
6 changes: 1 addition & 5 deletions substrate/frame/authority-discovery/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@ extern crate alloc;
use alloc::vec::Vec;
use frame::{
deps::frame_support::WeakBoundedVec,
derive::DefaultNoBound,
prelude::*,
traits::{Get, OneSessionHandler},
};
use sp_authority_discovery::AuthorityId;

pub use pallet::*;

// #[frame_support::pallet]
#[frame::pallet]
pub mod pallet {
use super::*;
Expand All @@ -61,7 +59,7 @@ pub mod pallet {
pub(super) type NextKeys<T: Config> =
StorageValue<_, WeakBoundedVec<AuthorityId, T::MaxAuthorities>, ValueQuery>;

#[derive(DefaultNoBound)]
#[derive(frame::derive::DefaultNoBound)]
#[pallet::genesis_config]
pub struct GenesisConfig<T: Config> {
pub keys: Vec<AuthorityId>,
Expand Down Expand Up @@ -313,8 +311,6 @@ mod tests {
let mut externalities = TestExternalities::new(t);

externalities.execute_with(|| {
use frame::deps::frame_support::traits::OneSessionHandler;

AuthorityDiscovery::on_genesis_session(
first_authorities.iter().map(|id| (id, id.clone())),
);
Expand Down

0 comments on commit c1c1023

Please sign in to comment.