Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/frontier block import #136

Merged
merged 2 commits into from
Aug 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ use sp_runtime::{app_crypto::AppCrypto, traits::BlakeTwo256};
use substrate_prometheus_endpoint::Registry;

// Frontier
use fc_consensus::FrontierBlockImport;
use fc_mapping_sync::{kv::MappingSyncWorker, SyncStrategy};
use fc_rpc::EthTask;
use fc_rpc_core::types::{FeeHistoryCache, FilterPool};
Expand Down Expand Up @@ -106,13 +105,10 @@ type ParachainExecutor<Executor> = NativeElseWasmExecutor<Executor>;
pub type ParachainClient<RuntimeApi, Executor> =
TFullClient<Block, RuntimeApi, ParachainExecutor<Executor>>;
type ParachainBackend = TFullBackend<Block>;
// Does NOT have FrontierBlockImport for the following issue: https://github.com/paritytech/frontier/issues/603
type ParachainBlockImport<RuntimeApi, Executor> = TParachainBlockImport<
Block,
FrontierBlockImport<
Block,
Arc<TFullClient<Block, RuntimeApi, ParachainExecutor<Executor>>>,
TFullClient<Block, RuntimeApi, ParachainExecutor<Executor>>,
>,
Arc<TFullClient<Block, RuntimeApi, ParachainExecutor<Executor>>>,
ParachainBackend,
>;

Expand Down Expand Up @@ -203,9 +199,7 @@ where

let frontier_backend = crate::rpc::open_frontier_backend(client.clone(), config)?;

let frontier_block_import = FrontierBlockImport::new(client.clone(), client.clone());

let parachain_block_import = TParachainBlockImport::new(frontier_block_import, backend.clone());
let parachain_block_import = TParachainBlockImport::new(client.clone(), backend.clone());

let import_queue = build_import_queue(
client.clone(),
Expand Down