cargo +nightly fmt (#3540)

* cargo +nightly fmt

* add cargo-fmt check to ci

* update ci

* fmt

* fmt

* skip macro

* ignore bridges
This commit is contained in:
Shawn Tabrizi
2021-08-02 12:47:33 +02:00
committed by GitHub
parent 30e3012270
commit ff5d56fb76
350 changed files with 20617 additions and 21266 deletions
+6 -22
View File
@@ -16,14 +16,14 @@
//! Chain specifications for the test runtime.
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
use babe_primitives::AuthorityId as BabeId;
use grandpa::AuthorityId as GrandpaId;
use pallet_staking::Forcing;
use polkadot_primitives::v1::{ValidatorId, AccountId, AssignmentId, MAX_CODE_SIZE, MAX_POV_SIZE};
use polkadot_primitives::v1::{AccountId, AssignmentId, ValidatorId, MAX_CODE_SIZE, MAX_POV_SIZE};
use polkadot_service::chain_spec::{get_account_id_from_seed, get_from_seed, Extensions};
use polkadot_test_runtime::{constants::currency::DOTS, BABE_GENESIS_EPOCH_CONFIG};
use sc_chain_spec::{ChainSpec, ChainType};
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
use sp_core::sr25519;
use sp_runtime::Perbill;
@@ -51,10 +51,7 @@ pub fn polkadot_local_testnet_config() -> PolkadotChainSpec {
/// Local testnet genesis config (multivalidator Alice + Bob)
pub fn polkadot_local_testnet_genesis() -> polkadot_test_runtime::GenesisConfig {
polkadot_testnet_genesis(
vec![
get_authority_keys_from_seed("Alice"),
get_authority_keys_from_seed("Bob"),
],
vec![get_authority_keys_from_seed("Alice"), get_authority_keys_from_seed("Bob")],
get_account_id_from_seed::<sr25519::Public>("Alice"),
None,
)
@@ -120,10 +117,7 @@ fn polkadot_testnet_genesis(
},
indices: runtime::IndicesConfig { indices: vec![] },
balances: runtime::BalancesConfig {
balances: endowed_accounts
.iter()
.map(|k| (k.clone(), ENDOWMENT))
.collect(),
balances: endowed_accounts.iter().map(|k| (k.clone(), ENDOWMENT)).collect(),
},
session: runtime::SessionConfig {
keys: initial_authorities
@@ -148,14 +142,7 @@ fn polkadot_testnet_genesis(
validator_count: 2,
stakers: initial_authorities
.iter()
.map(|x| {
(
x.0.clone(),
x.1.clone(),
STASH,
runtime::StakerStatus::Validator,
)
})
.map(|x| (x.0.clone(), x.1.clone(), STASH, runtime::StakerStatus::Validator))
.collect(),
invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(),
force_era: Forcing::NotForcing,
@@ -168,10 +155,7 @@ fn polkadot_testnet_genesis(
},
grandpa: Default::default(),
authority_discovery: runtime::AuthorityDiscoveryConfig { keys: vec![] },
claims: runtime::ClaimsConfig {
claims: vec![],
vesting: vec![],
},
claims: runtime::ClaimsConfig { claims: vec![], vesting: vec![] },
vesting: runtime::VestingConfig { vesting: vec![] },
sudo: runtime::SudoConfig { key: root_key },
parachains_configuration: runtime::ParachainsConfigurationConfig {