diff --git a/ol/cli/src/commands/init_cmd.rs b/ol/cli/src/commands/init_cmd.rs index 92ec2e9828..bc54804421 100644 --- a/ol/cli/src/commands/init_cmd.rs +++ b/ol/cli/src/commands/init_cmd.rs @@ -85,6 +85,10 @@ pub struct InitCmd { /// Path to source code, for devs #[options(help = "Path to source code, for devs")] source_path: Option, + + /// reset the safety rules state in key_store.json + #[options(help = "reset the safety data in key_store.json to null")] + reset_safety: bool, } impl Runnable for InitCmd { @@ -250,6 +254,14 @@ impl Runnable for InitCmd { return; } + if self.reset_safety { + diem_genesis_tool::key::reset_safety_data( + &app_cfg.workspace.node_home, + &app_cfg.format_owner_namespace() + ); + exit(0) + } + /////////// Everything below requires mnemonic //////// let (authkey, account, wallet) = wallet::get_account_from_prompt(); diff --git a/ol/cli/src/mgmt/restore.rs b/ol/cli/src/mgmt/restore.rs index 29f9850cb9..7ab3a448ab 100644 --- a/ol/cli/src/mgmt/restore.rs +++ b/ol/cli/src/mgmt/restore.rs @@ -73,6 +73,7 @@ pub fn fast_forward_db( &backup.home_path, &backup.node_namespace ); + println!("SUCCESS"); Ok(()) }