Skip to content

Commit 42a0b9d

Browse files
committed
fmt
1 parent d4364a4 commit 42a0b9d

File tree

6 files changed

+8
-15
lines changed

6 files changed

+8
-15
lines changed

substrate/bin/node/cli/src/chain_spec.rs

-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ pub fn testnet_genesis(
314314
let (initial_authorities, endowed_accounts, stakers) =
315315
configure_accounts(initial_authorities, initial_nominators, endowed_accounts, STASH);
316316

317-
318317
serde_json::json!({
319318
"balances": {
320319
"balances": endowed_accounts.iter().cloned().map(|x| (x, ENDOWMENT)).collect::<Vec<_>>(),

substrate/frame/staking/src/migrations.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ pub mod v16 {
9090

9191
#[frame_support::storage_alias]
9292
pub(crate) type DisabledValidators<T: Config> =
93-
StorageValue<Pallet<T>, Vec<(u32, OffenceSeverity)>, ValueQuery>;
94-
93+
StorageValue<Pallet<T>, Vec<(u32, OffenceSeverity)>, ValueQuery>;
9594

9695
pub struct VersionUncheckedMigrateV15ToV16<T>(core::marker::PhantomData<T>);
9796
impl<T: Config> UncheckedOnRuntimeUpgrade for VersionUncheckedMigrateV15ToV16<T> {

substrate/frame/staking/src/mock.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ pub(crate) fn on_offence_in_era(
741741
let _ = <Staking as OnOffenceHandler<_, _, _>>::on_offence(
742742
offenders,
743743
slash_fraction,
744-
start_session
744+
start_session,
745745
);
746746
return
747747
} else if bonded_era > era {

substrate/frame/staking/src/pallet/impls.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,6 @@ impl<T: Config> Pallet<T> {
13741374

13751375
consumed_weight
13761376
}
1377-
13781377
}
13791378

13801379
impl<T: Config> Pallet<T> {
@@ -1668,7 +1667,8 @@ where
16681667
OffenceDetails { offender: offender.clone(), reporters: details.reporters.clone() }
16691668
});
16701669

1671-
Self::on_offence(offenders, slash_fractions, slash_session) }
1670+
Self::on_offence(offenders, slash_fractions, slash_session)
1671+
}
16721672
}
16731673

16741674
impl<T: Config> ScoreProvider<T::AccountId> for Pallet<T> {

substrate/frame/staking/src/pallet/mod.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,9 @@ pub use impls::*;
5353

5454
use crate::{
5555
asset, slashing, weights::WeightInfo, AccountIdLookupOf, ActiveEraInfo, BalanceOf, EraPayout,
56-
EraRewardPoints, ExposurePage, Forcing, LedgerIntegrityState, MaxNominationsOf,
56+
EraRewardPoints, Exposure, ExposurePage, Forcing, LedgerIntegrityState, MaxNominationsOf,
5757
NegativeImbalanceOf, Nominations, NominationsQuota, PositiveImbalanceOf, RewardDestination,
5858
SessionInterface, StakingLedger, UnappliedSlash, UnlockChunk, ValidatorPrefs,
59-
Exposure,
6059
};
6160

6261
// The speculative number of spans are used as an input of the weight annotation of
@@ -314,7 +313,6 @@ pub mod pallet {
314313
#[pallet::no_default_bounds]
315314
type EventListeners: sp_staking::OnStakingUpdate<Self::AccountId, BalanceOf<Self>>;
316315

317-
318316
#[pallet::no_default_bounds]
319317
/// Filter some accounts from participating in staking.
320318
///
@@ -873,9 +871,7 @@ pub mod pallet {
873871
/// A new force era mode was set.
874872
ForceEra { mode: Forcing },
875873
/// Report of a controller batch deprecation.
876-
ControllerBatchDeprecated {
877-
failures: u32,
878-
},
874+
ControllerBatchDeprecated { failures: u32 },
879875
/// Staking balance migrated from locks to holds, with any balance that could not be held
880876
/// is force withdrawn.
881877
CurrencyMigrated { stash: T::AccountId, force_withdraw: BalanceOf<T> },

substrate/frame/staking/src/slashing.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@
5050
//! Based on research at <https://research.web3.foundation/en/latest/polkadot/slashing/npos.html>
5151
5252
use crate::{
53-
asset, BalanceOf, Config, Error, NegativeImbalanceOf, NominatorSlashInEra,
54-
Pallet, Perbill, Exposure,
55-
SpanSlash, UnappliedSlash, ValidatorSlashInEra,
53+
asset, BalanceOf, Config, Error, Exposure, NegativeImbalanceOf, NominatorSlashInEra, Pallet,
54+
Perbill, SpanSlash, UnappliedSlash, ValidatorSlashInEra,
5655
};
5756
use alloc::vec::Vec;
5857
use codec::{Decode, Encode, MaxEncodedLen};

0 commit comments

Comments
 (0)