Skip to content

Commit

Permalink
finalyl node compiles
Browse files Browse the repository at this point in the history
  • Loading branch information
girazoki committed Sep 25, 2023
1 parent 1cea75d commit 4d28b5d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion container-chains/templates/frontier/node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ pub fn run() -> Result<()> {
}
Some(Subcommand::ExportGenesisState(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.sync_run(|config| {
runner.sync_run(|mut config| {
let partials = new_partial(&mut config, false)?;
cmd.run(&*config.chain_spec, &*partials.client)
})
Expand Down
26 changes: 17 additions & 9 deletions container-chains/templates/frontier/node/src/rpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ use {
std::{sync::Arc, time::Duration},
};

pub struct DefaultEthConfig<C, BE>(std::marker::PhantomData<(C, BE)>);

impl<C, BE> fc_rpc::EthConfig<Block, C> for DefaultEthConfig<C, BE>
where
C: StorageProvider<Block, BE> + Sync + Send + 'static,
BE: Backend<Block> + 'static,
{
type EstimateGasAdapter = ();
type RuntimeStorageOverride =
fc_rpc::frontier_backend_client::SystemAccountId20StorageOverride<Block, C, BE>;
}

mod eth;
pub use eth::*;

Expand Down Expand Up @@ -96,7 +108,7 @@ pub struct FullDeps<C, P, A: ChainApi, BE> {
}

/// Instantiate all Full RPC extensions.
pub fn create_full<B, C, P, BE, A, EC>(
pub fn create_full<C, P, BE, A>(
deps: FullDeps<C, P, A, BE>,
subscription_task_executor: SubscriptionTaskExecutor,
pubsub_notification_sinks: Arc<
Expand All @@ -106,20 +118,17 @@ pub fn create_full<B, C, P, BE, A, EC>(
>,
) -> Result<RpcModule<()>, Box<dyn std::error::Error + Send + Sync>>
where
B: BlockT<Hash = H256>,
BE: Backend<Block> + 'static,
BE::State: StateBackend<BlakeTwo256>,
BE::Blockchain: BlockchainBackend<Block>,
C: ProvideRuntimeApi<Block> + StorageProvider<Block, BE> + AuxStore,
C: BlockchainEvents<Block>,
C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,
C: CallApiAt<Block>,
C: ProvideRuntimeApi<Block>,
C: Send + Sync + 'static,
A: ChainApi<Block = Block> + 'static,
C::Api: RuntimeApiCollection,
P: TransactionPool<Block = Block> + 'static,
EC: EthConfig<B, C>,
{
use {
fc_rpc::{
Expand Down Expand Up @@ -166,11 +175,10 @@ where
}
let convert_transaction: Option<Never> = None;

let pending_create_inherent_data_providers = move |_, ()| async move {
Ok(())
};
let pending_create_inherent_data_providers = move |_, _| async move { Ok(()) };

io.merge(
Eth::<_, _, _, _, _, _, _, EC>::new(
Eth::< _, _, _, _, _, _, _, DefaultEthConfig<C, BE>>::new(
Arc::clone(&client),
Arc::clone(&pool),
Arc::clone(&graph),
Expand All @@ -192,7 +200,7 @@ where
.into_rpc(),
)?;

let tx_pool = TxPool::new(client.clone(), graph);
let tx_pool = TxPool::new(client.clone(), graph.clone());
if let Some(filter_pool) = filter_pool {
io.merge(
EthFilter::new(
Expand Down

0 comments on commit 4d28b5d

Please sign in to comment.