diff --git a/substrate/frame/aura/src/lib.rs b/substrate/frame/aura/src/lib.rs index 222360dc3a..fd6882ca9f 100644 --- a/substrate/frame/aura/src/lib.rs +++ b/substrate/frame/aura/src/lib.rs @@ -146,7 +146,11 @@ pub mod pallet { } impl Pallet { - fn change_authorities(new: WeakBoundedVec) { + /// Change authorities. + /// + /// The storage will be applied immediately. + /// And aura consensus log will be appended to block's log. + pub fn change_authorities(new: WeakBoundedVec) { >::put(&new); let log = DigestItem::Consensus( @@ -156,7 +160,12 @@ impl Pallet { >::deposit_log(log); } - fn initialize_authorities(authorities: &[T::AuthorityId]) { + /// Initial authorities. + /// + /// The storage will be applied immediately. + /// + /// The authorities length must be equal or less than T::MaxAuthorities. + pub fn initialize_authorities(authorities: &[T::AuthorityId]) { if !authorities.is_empty() { assert!(>::get().is_empty(), "Authorities are already initialized!"); let bounded = >::try_from(authorities)