Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

let initialize function in pallet-grandpa/pallet-babe and other session managed pallets be pub #14556

Closed
Closed
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
2 changes: 1 addition & 1 deletion frame/authority-discovery/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl<T: Config> Pallet<T> {
NextKeys::<T>::get()
}

fn initialize_keys(keys: &Vec<AuthorityId>) {
pub fn initialize_keys(keys: &Vec<AuthorityId>) {
if !keys.is_empty() {
assert!(Keys::<T>::get().is_empty(), "Keys are already initialized!");

Expand Down
2 changes: 1 addition & 1 deletion frame/babe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ impl<T: Config> Pallet<T> {
}
}

fn initialize_genesis_authorities(authorities: &[(AuthorityId, BabeAuthorityWeight)]) {
pub fn initialize_genesis_authorities(authorities: &[(AuthorityId, BabeAuthorityWeight)]) {
if !authorities.is_empty() {
assert!(Authorities::<T>::get().is_empty(), "Authorities are already initialized!");
let bounded_authorities =
Expand Down
2 changes: 1 addition & 1 deletion frame/grandpa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ impl<T: Config> Pallet<T> {

// Perform module initialization, abstracted so that it can be called either through genesis
// config builder or through `on_genesis_session`.
fn initialize(authorities: &AuthorityList) {
pub fn initialize(authorities: &AuthorityList) {
if !authorities.is_empty() {
assert!(Self::grandpa_authorities().is_empty(), "Authorities are already initialized!");
Self::set_grandpa_authorities(authorities);
Expand Down
2 changes: 1 addition & 1 deletion frame/im-online/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ impl<T: Config> Pallet<T> {
res
}

fn initialize_keys(keys: &[T::AuthorityId]) {
pub fn initialize_keys(keys: &[T::AuthorityId]) {
if !keys.is_empty() {
assert!(Keys::<T>::get().is_empty(), "Keys are already initialized!");
let bounded_keys = <BoundedSlice<'_, _, T::MaxKeys>>::try_from(keys)
Expand Down