Skip to content

Commit bb77b23

Browse files
committed
cargo fmt
1 parent 4be79cd commit bb77b23

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+259
-243
lines changed

node/src/chain_spec/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ use sc_service::ChainType;
1212
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
1313
use sp_consensus_grandpa::AuthorityId as GrandpaId;
1414
use sp_core::crypto::Ss58Codec;
15-
use sp_core::{bounded_vec, sr25519, Pair, Public, H256};
16-
use sp_runtime::traits::{IdentifyAccount, Verify};
15+
use sp_core::{H256, Pair, Public, bounded_vec, sr25519};
1716
use sp_runtime::AccountId32;
17+
use sp_runtime::traits::{IdentifyAccount, Verify};
1818
use std::collections::HashSet;
1919
use std::env;
2020
use std::str::FromStr;

node/src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use node_subtensor_runtime::{opaque::Block, RuntimeApi};
1+
use node_subtensor_runtime::{RuntimeApi, opaque::Block};
22
use sc_executor::WasmExecutor;
33

44
/// Full backend.

node/src/command.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ use crate::{
44
ethereum::db_config_dir,
55
service,
66
};
7-
use fc_db::{kv::frontier_database_dir, DatabaseSource};
7+
use fc_db::{DatabaseSource, kv::frontier_database_dir};
88

99
use futures::TryFutureExt;
1010
use node_subtensor_runtime::Block;
1111
use sc_cli::SubstrateCli;
1212
use sc_service::{
13-
config::{ExecutorConfiguration, RpcConfiguration},
1413
Configuration,
14+
config::{ExecutorConfiguration, RpcConfiguration},
1515
};
1616

1717
impl SubstrateCli for Cli {
@@ -115,7 +115,7 @@ pub fn run() -> sc_cli::Result<()> {
115115
"Cannot purge `{:?}` database",
116116
config.database
117117
)
118-
.into())
118+
.into());
119119
}
120120
};
121121
cmd.run(frontier_database_config)?;
@@ -134,7 +134,7 @@ pub fn run() -> sc_cli::Result<()> {
134134
"Cannot purge `{:?}` database: {:?}",
135135
db_path, err,
136136
)
137-
.into())
137+
.into());
138138
}
139139
};
140140
}
@@ -157,7 +157,7 @@ pub fn run() -> sc_cli::Result<()> {
157157
#[cfg(feature = "runtime-benchmarks")]
158158
Some(Subcommand::Benchmark(cmd)) => {
159159
use crate::benchmarking::{
160-
inherent_benchmark_data, RemarkBuilder, TransferKeepAliveBuilder,
160+
RemarkBuilder, TransferKeepAliveBuilder, inherent_benchmark_data,
161161
};
162162
use frame_benchmarking_cli::{
163163
BenchmarkCmd, ExtrinsicFactory, SUBSTRATE_REFERENCE_HARDWARE,

node/src/ethereum.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
pub use fc_consensus::FrontierBlockImport;
22
use fc_rpc::{
3-
pending::AuraConsensusDataProvider, Debug, DebugApiServer, Eth, EthApiServer, EthConfig,
4-
EthDevSigner, EthFilter, EthFilterApiServer, EthPubSub, EthPubSubApiServer, EthSigner, EthTask,
5-
Net, NetApiServer, Web3, Web3ApiServer,
3+
Debug, DebugApiServer, Eth, EthApiServer, EthConfig, EthDevSigner, EthFilter,
4+
EthFilterApiServer, EthPubSub, EthPubSubApiServer, EthSigner, EthTask, Net, NetApiServer, Web3,
5+
Web3ApiServer, pending::AuraConsensusDataProvider,
66
};
77
pub use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool};
88
/// Frontier DB backend type.
99
pub use fc_storage::{StorageOverride, StorageOverrideHandler};
1010
use fp_rpc::ConvertTransaction;
11-
use futures::future;
1211
use futures::StreamExt;
12+
use futures::future;
1313
use jsonrpsee::RpcModule;
1414
use node_subtensor_runtime::opaque::Block;
1515
use sc_client_api::client::BlockchainEvents;
1616
use sc_network_sync::SyncingService;
1717
use sc_rpc::SubscriptionTaskExecutor;
18-
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
18+
use sc_service::{Configuration, TaskManager, error::Error as ServiceError};
1919
use sc_transaction_pool::ChainApi;
2020
use sc_transaction_pool_api::TransactionPool;
2121
use sp_inherents::CreateInherentDataProviders;

node/src/rpc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ pub use fc_rpc::EthBlockDataCacheTask;
1313
pub use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool};
1414
use fc_storage::StorageOverride;
1515
use jsonrpsee::RpcModule;
16-
use node_subtensor_runtime::opaque::Block;
1716
use node_subtensor_runtime::Hash;
17+
use node_subtensor_runtime::opaque::Block;
1818
use sc_consensus_manual_seal::EngineCommand;
1919
use sc_network::service::traits::NetworkService;
2020
use sc_network_sync::SyncingService;

node/src/service.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
22
3-
use fp_consensus::{ensure_log, FindLogError};
3+
use fp_consensus::{FindLogError, ensure_log};
44
use fp_rpc::EthereumRuntimeRPCApi;
5-
use futures::{channel::mpsc, future, FutureExt};
6-
use node_subtensor_runtime::{opaque::Block, RuntimeApi, TransactionConverter};
5+
use futures::{FutureExt, channel::mpsc, future};
6+
use node_subtensor_runtime::{RuntimeApi, TransactionConverter, opaque::Block};
77
use sc_client_api::{Backend as BackendT, BlockBackend};
88
use sc_consensus::{
99
BasicQueue, BlockCheckParams, BlockImport, BlockImportParams, BoxBlockImport, ImportResult,
1010
};
1111
use sc_consensus_grandpa::BlockNumberOps;
1212
use sc_consensus_slots::BackoffAuthoringOnFinalizedHeadLagging;
1313
use sc_network_sync::strategy::warp::{WarpSyncConfig, WarpSyncProvider};
14-
use sc_service::{error::Error as ServiceError, Configuration, PartialComponents, TaskManager};
15-
use sc_telemetry::{log, Telemetry, TelemetryHandle, TelemetryWorker};
14+
use sc_service::{Configuration, PartialComponents, TaskManager, error::Error as ServiceError};
15+
use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, log};
1616
use sc_transaction_pool::FullPool;
1717
use sc_transaction_pool_api::OffchainTransactionPoolFactory;
1818
use sp_api::ProvideRuntimeApi;
@@ -27,9 +27,9 @@ use substrate_prometheus_endpoint::Registry;
2727
use crate::cli::Sealing;
2828
use crate::client::{FullBackend, FullClient, HostFunctions, RuntimeExecutor};
2929
use crate::ethereum::{
30-
db_config_dir, new_frontier_partial, spawn_frontier_tasks, BackendType, EthConfiguration,
31-
FrontierBackend, FrontierBlockImport, FrontierPartialComponents, StorageOverride,
32-
StorageOverrideHandler,
30+
BackendType, EthConfiguration, FrontierBackend, FrontierBlockImport, FrontierPartialComponents,
31+
StorageOverride, StorageOverrideHandler, db_config_dir, new_frontier_partial,
32+
spawn_frontier_tasks,
3333
};
3434

3535
/// The minimum period of blocks on which justifications will be

pallets/admin-utils/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use frame_system::pallet_prelude::BlockNumberFor;
1212
// - we could use a type parameter for `AuthorityId`, but there is
1313
// no sense for this as GRANDPA's `AuthorityId` is not a parameter -- it's always the same
1414
use sp_consensus_grandpa::AuthorityList;
15-
use sp_runtime::{traits::Member, DispatchResult, RuntimeAppPublic};
15+
use sp_runtime::{DispatchResult, RuntimeAppPublic, traits::Member};
1616

1717
mod benchmarking;
1818

@@ -586,10 +586,10 @@ pub mod pallet {
586586
target_registrations_per_interval,
587587
);
588588
log::debug!(
589-
"RegistrationPerIntervalSet( netuid: {:?} target_registrations_per_interval: {:?} ) ",
590-
netuid,
591-
target_registrations_per_interval
592-
);
589+
"RegistrationPerIntervalSet( netuid: {:?} target_registrations_per_interval: {:?} ) ",
590+
netuid,
591+
target_registrations_per_interval
592+
);
593593
Ok(())
594594
}
595595

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ use frame_support::{
66
weights,
77
};
88
use frame_system as system;
9-
use frame_system::{limits, EnsureNever, EnsureRoot};
9+
use frame_system::{EnsureNever, EnsureRoot, limits};
1010
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
1111
use sp_consensus_grandpa::AuthorityList as GrandpaAuthorityList;
1212
use sp_core::U256;
1313
use sp_core::{ConstU64, H256};
1414
use sp_runtime::{
15+
BuildStorage, KeyTypeId, Perbill,
1516
testing::TestXt,
1617
traits::{BlakeTwo256, ConstU32, IdentityLookup},
17-
BuildStorage, KeyTypeId, Perbill,
1818
};
1919
use sp_std::cmp::Ordering;
2020
use sp_weights::Weight;
@@ -326,8 +326,8 @@ pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b"test");
326326

327327
mod test_crypto {
328328
use super::KEY_TYPE;
329-
use sp_core::sr25519::{Public as Sr25519Public, Signature as Sr25519Signature};
330329
use sp_core::U256;
330+
use sp_core::sr25519::{Public as Sr25519Public, Signature as Sr25519Signature};
331331
use sp_runtime::{
332332
app_crypto::{app_crypto, sr25519},
333333
traits::IdentifyAccount,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ use pallet_subtensor::Error as SubtensorError;
99
// use pallet_subtensor::{migrations, Event};
1010
use pallet_subtensor::Event;
1111
use sp_consensus_grandpa::AuthorityId as GrandpaId;
12-
use sp_core::{ed25519, Pair, U256};
12+
use sp_core::{Pair, U256, ed25519};
1313

14-
use crate::pallet::PrecompileEnable;
1514
use crate::Error;
15+
use crate::pallet::PrecompileEnable;
1616
use mock::*;
1717

1818
mod mock;

pallets/collective/src/lib.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ use frame_support::{
5454
use scale_info::TypeInfo;
5555
use sp_io::storage;
5656
use sp_runtime::traits::Dispatchable;
57-
use sp_runtime::{traits::Hash, RuntimeDebug, Saturating};
57+
use sp_runtime::{RuntimeDebug, Saturating, traits::Hash};
5858
use sp_std::{marker::PhantomData, prelude::*, result};
5959

6060
#[cfg(test)]
@@ -1107,10 +1107,10 @@ where
11071107

11081108
pub struct EnsureMember<AccountId, I: 'static>(PhantomData<(AccountId, I)>);
11091109
impl<
1110-
O: Into<Result<RawOrigin<AccountId, I>, O>> + From<RawOrigin<AccountId, I>>,
1111-
I,
1112-
AccountId: Decode,
1113-
> EnsureOrigin<O> for EnsureMember<AccountId, I>
1110+
O: Into<Result<RawOrigin<AccountId, I>, O>> + From<RawOrigin<AccountId, I>>,
1111+
I,
1112+
AccountId: Decode,
1113+
> EnsureOrigin<O> for EnsureMember<AccountId, I>
11141114
{
11151115
type Success = AccountId;
11161116
fn try_origin(o: O) -> Result<Self::Success, O> {
@@ -1131,11 +1131,11 @@ impl<
11311131

11321132
pub struct EnsureMembers<AccountId, I: 'static, const N: u32>(PhantomData<(AccountId, I)>);
11331133
impl<
1134-
O: Into<Result<RawOrigin<AccountId, I>, O>> + From<RawOrigin<AccountId, I>>,
1135-
AccountId,
1136-
I,
1137-
const N: u32,
1138-
> EnsureOrigin<O> for EnsureMembers<AccountId, I, N>
1134+
O: Into<Result<RawOrigin<AccountId, I>, O>> + From<RawOrigin<AccountId, I>>,
1135+
AccountId,
1136+
I,
1137+
const N: u32,
1138+
> EnsureOrigin<O> for EnsureMembers<AccountId, I, N>
11391139
{
11401140
type Success = (MemberCount, MemberCount);
11411141
fn try_origin(o: O) -> Result<Self::Success, O> {
@@ -1155,12 +1155,12 @@ pub struct EnsureProportionMoreThan<AccountId, I: 'static, const N: u32, const D
11551155
PhantomData<(AccountId, I)>,
11561156
);
11571157
impl<
1158-
O: Into<Result<RawOrigin<AccountId, I>, O>> + From<RawOrigin<AccountId, I>>,
1159-
AccountId,
1160-
I,
1161-
const N: u32,
1162-
const D: u32,
1163-
> EnsureOrigin<O> for EnsureProportionMoreThan<AccountId, I, N, D>
1158+
O: Into<Result<RawOrigin<AccountId, I>, O>> + From<RawOrigin<AccountId, I>>,
1159+
AccountId,
1160+
I,
1161+
const N: u32,
1162+
const D: u32,
1163+
> EnsureOrigin<O> for EnsureProportionMoreThan<AccountId, I, N, D>
11641164
{
11651165
type Success = ();
11661166
fn try_origin(o: O) -> Result<Self::Success, O> {
@@ -1180,12 +1180,12 @@ pub struct EnsureProportionAtLeast<AccountId, I: 'static, const N: u32, const D:
11801180
PhantomData<(AccountId, I)>,
11811181
);
11821182
impl<
1183-
O: Into<Result<RawOrigin<AccountId, I>, O>> + From<RawOrigin<AccountId, I>>,
1184-
AccountId,
1185-
I,
1186-
const N: u32,
1187-
const D: u32,
1188-
> EnsureOrigin<O> for EnsureProportionAtLeast<AccountId, I, N, D>
1183+
O: Into<Result<RawOrigin<AccountId, I>, O>> + From<RawOrigin<AccountId, I>>,
1184+
AccountId,
1185+
I,
1186+
const N: u32,
1187+
const D: u32,
1188+
> EnsureOrigin<O> for EnsureProportionAtLeast<AccountId, I, N, D>
11891189
{
11901190
type Success = ();
11911191
fn try_origin(o: O) -> Result<Self::Success, O> {

0 commit comments

Comments
 (0)