Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions bin/reth/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>, Ext: clap::Args + fmt::Debug> Cl
runner.run_command_until_exit(|ctx| command.execute::<EthereumNode>(ctx))
}
Commands::Prune(command) => runner.run_until_ctrl_c(command.execute::<EthereumNode>()),
Commands::BitfinityResetEvmState(builder) => runner
.run_until_ctrl_c(async move { builder.build().await.unwrap().execute().await }),
}
}

Expand Down Expand Up @@ -237,6 +239,12 @@ pub enum Commands<C: ChainSpecParser, Ext: clap::Args + fmt::Debug> {
/// Prune according to the configuration without any limits
#[command(name = "prune")]
Prune(prune::PruneCommand<C>),

/// Export state to EVM canister
#[command(name = "bitfinity-reset-evm-state")]
BitfinityResetEvmState(
crate::commands::bitfinity_reset_evm_state::BitfinityResetEvmStateCommandBuilder,
),
}

#[cfg(test)]
Expand Down
7 changes: 3 additions & 4 deletions bin/reth/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ fn main() {
warn!(target: "reth::cli", "Experimental engine is default now, and the --engine.experimental flag is deprecated. To enable the legacy functionality, use --engine.legacy.");
}

let use_legacy_engine = engine_args.legacy;

// let use_legacy_engine = engine_args.legacy;
// Bitfinity import is implemented only for the legacy engine
let use_legacy_engine = true;

Expand Down Expand Up @@ -101,7 +100,7 @@ fn main() {
let config = handle.node.config.config.clone();
let chain = handle.node.chain_spec();
let datadir = handle.node.data_dir.clone();
let (provider_factory, bitfinity) = handle.bitfinity_import.clone().expect("Bitfinity import not configured");
let (provider_factory, bitfinity) = handle.bitfinity_import.clone().expect("Bitfinity import not configured");

// Init bitfinity import
{
Expand All @@ -115,7 +114,7 @@ fn main() {
);
let _import_handle = import.schedule_execution().await?;
};

handle.node_exit_future.await
}
}
Expand Down
Loading