Skip to content

Commit d0c508e

Browse files
committed
Reformat
1 parent d21b251 commit d0c508e

File tree

3 files changed

+18
-20
lines changed

3 files changed

+18
-20
lines changed

pallets/admin-utils/src/lib.rs

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,20 +1250,20 @@ pub mod pallet {
12501250
}
12511251

12521252
/// A public interface for `pallet_grandpa::Pallet::schedule_grandpa_change`.
1253-
///
1254-
/// Schedule a change in the authorities.
1255-
///
1256-
/// The change will be applied at the end of execution of the block `in_blocks` after the
1257-
/// current block. This value may be 0, in which case the change is applied at the end of
1258-
/// the current block.
1259-
///
1260-
/// If the `forced` parameter is defined, this indicates that the current set has been
1261-
/// synchronously determined to be offline and that after `in_blocks` the given change
1262-
/// should be applied. The given block number indicates the median last finalized block
1263-
/// number and it should be used as the canon block when starting the new grandpa voter.
1264-
///
1265-
/// No change should be signaled while any change is pending. Returns an error if a change
1266-
/// is already pending.
1253+
///
1254+
/// Schedule a change in the authorities.
1255+
///
1256+
/// The change will be applied at the end of execution of the block `in_blocks` after the
1257+
/// current block. This value may be 0, in which case the change is applied at the end of
1258+
/// the current block.
1259+
///
1260+
/// If the `forced` parameter is defined, this indicates that the current set has been
1261+
/// synchronously determined to be offline and that after `in_blocks` the given change
1262+
/// should be applied. The given block number indicates the median last finalized block
1263+
/// number and it should be used as the canon block when starting the new grandpa voter.
1264+
///
1265+
/// No change should be signaled while any change is pending. Returns an error if a change
1266+
/// is already pending.
12671267
#[pallet::call_index(59)]
12681268
#[pallet::weight(<T as Config>::WeightInfo::swap_authorities(next_authorities.len() as u32))]
12691269
pub fn schedule_grandpa_change(
@@ -1294,8 +1294,6 @@ impl<A, M> AuraInterface<A, M> for () {
12941294
fn change_authorities(_: BoundedVec<A, M>) {}
12951295
}
12961296

1297-
1298-
12991297
pub trait GrandpaInterface<Runtime>
13001298
where
13011299
Runtime: frame_system::Config,

pallets/admin-utils/src/tests/mock.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use frame_support::{
66
weights,
77
};
88
use frame_system as system;
9-
use frame_system::{limits, pallet_prelude::BlockNumberFor, EnsureNever, EnsureRoot};
9+
use frame_system::{limits, EnsureNever, EnsureRoot};
1010
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
1111
use sp_consensus_grandpa::AuthorityList as GrandpaAuthorityList;
1212
use sp_core::U256;
@@ -268,8 +268,8 @@ pub struct GrandpaInterfaceImpl;
268268
impl crate::GrandpaInterface<Test> for GrandpaInterfaceImpl {
269269
fn schedule_change(
270270
next_authorities: GrandpaAuthorityList,
271-
in_blocks: BlockNumberFor<Test>,
272-
forced: Option<BlockNumberFor<Test>>,
271+
in_blocks: BlockNumber,
272+
forced: Option<BlockNumber>,
273273
) -> sp_runtime::DispatchResult {
274274
Grandpa::schedule_change(next_authorities, in_blocks, forced)
275275
}

runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ impl pallet_admin_utils::Config for Runtime {
11371137
type AuthorityId = AuraId;
11381138
type MaxAuthorities = ConstU32<32>;
11391139
type Aura = AuraPalletIntrf;
1140-
type Grandpa = GrandpaInterfaceImpl;
1140+
type Grandpa = GrandpaInterfaceImpl;
11411141
type Balance = Balance;
11421142
type WeightInfo = pallet_admin_utils::weights::SubstrateWeight<Runtime>;
11431143
}

0 commit comments

Comments
 (0)