Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
weezy20 committed Nov 1, 2023
1 parent fe34250 commit c125175
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
11 changes: 7 additions & 4 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,12 @@ pub fn run() -> Result<()> {
let collator_options = cli.run.collator_options();

runner.run_node_until_exit(|config| async move {
let hwbench = (!cli.no_hardware_benchmarks).then_some(
config.database.path().map(|database_path| {
let hwbench = (!cli.no_hardware_benchmarks)
.then_some(config.database.path().map(|database_path| {
let _ = std::fs::create_dir_all(database_path);
sc_sysinfo::gather_hwbench(Some(database_path))
})).flatten();
}))
.flatten();

let para_id = chain_spec::Extensions::try_get(&*config.chain_spec)
.map(|e| e.para_id)
Expand All @@ -340,7 +341,9 @@ pub fn run() -> Result<()> {
let id = ParaId::from(para_id);

let parachain_account =
AccountIdConversion::<polkadot_primitives::AccountId>::into_account_truncating(&id);
AccountIdConversion::<polkadot_primitives::AccountId>::into_account_truncating(
&id,
);

let block: frontier_parachain_runtime::opaque::Block =
generate_genesis_block(&*config.chain_spec, sp_runtime::StateVersion::V1)
Expand Down
10 changes: 4 additions & 6 deletions node/src/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{

use futures::{future, prelude::*};
// Substrate
use sc_client_api::{BlockchainEvents};
use sc_client_api::BlockchainEvents;
use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch};

use sc_network_sync::SyncingService;
Expand Down Expand Up @@ -117,11 +117,10 @@ pub trait EthCompatRuntimeApiCollection:
{
}

impl<Api> EthCompatRuntimeApiCollection for Api
where
impl<Api> EthCompatRuntimeApiCollection for Api where
Api: sp_api::ApiExt<Block>
+ fp_rpc::EthereumRuntimeRPCApi<Block>
+ fp_rpc::ConvertTransactionRuntimeApi<Block>,
+ fp_rpc::ConvertTransactionRuntimeApi<Block>
{
}

Expand All @@ -146,8 +145,7 @@ pub async fn spawn_frontier_tasks<RuntimeApi, Executor>(
TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>,
>,
RuntimeApi: Send + Sync + 'static,
RuntimeApi::RuntimeApi:
EthCompatRuntimeApiCollection,
RuntimeApi::RuntimeApi: EthCompatRuntimeApiCollection,
Executor: NativeExecutionDispatch + 'static,
{
// Spawn main mapping sync worker background task.
Expand Down

0 comments on commit c125175

Please sign in to comment.