diff --git a/bin/reth/src/cli/mod.rs b/bin/reth/src/cli/mod.rs index 6d0532fdecc..da9403926fe 100644 --- a/bin/reth/src/cli/mod.rs +++ b/bin/reth/src/cli/mod.rs @@ -182,6 +182,8 @@ impl, Ext: clap::Args + fmt::Debug> Cl runner.run_command_until_exit(|ctx| command.execute::(ctx)) } Commands::Prune(command) => runner.run_until_ctrl_c(command.execute::()), + Commands::BitfinityResetEvmState(builder) => runner + .run_until_ctrl_c(async move { builder.build().await.unwrap().execute().await }), } } @@ -237,6 +239,12 @@ pub enum Commands { /// Prune according to the configuration without any limits #[command(name = "prune")] Prune(prune::PruneCommand), + + /// Export state to EVM canister + #[command(name = "bitfinity-reset-evm-state")] + BitfinityResetEvmState( + crate::commands::bitfinity_reset_evm_state::BitfinityResetEvmStateCommandBuilder, + ), } #[cfg(test)] diff --git a/bin/reth/src/main.rs b/bin/reth/src/main.rs index d8ef8aea96b..f7d9bf62499 100644 --- a/bin/reth/src/main.rs +++ b/bin/reth/src/main.rs @@ -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; @@ -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 { @@ -115,7 +114,7 @@ fn main() { ); let _import_handle = import.schedule_execution().await?; }; - + handle.node_exit_future.await } }