Skip to content

Commit

Permalink
remove useless file
Browse files Browse the repository at this point in the history
  • Loading branch information
linfeng-crypto committed Jun 28, 2021
1 parent 23189f0 commit ab3100b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 36 deletions.
9 changes: 4 additions & 5 deletions providers/nitro/nitro-helper/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,19 @@ use crate::state::StateSyncer;

/// write tmkms.toml + tmkms.launch_all.toml + generate keys
pub fn init(
config_path: Option<PathBuf>,
config_path: PathBuf,
pubkey_display: Option<PubkeyDisplay>,
bech32_prefix: Option<String>,
aws_region: String,
kms_key_id: String,
cid: Option<u32>,
) -> Result<(), String> {
let cp = config_path.unwrap_or_else(|| "tmkms.toml".into());
let file_stem = cp
let file_stem = config_path
.file_stem()
.map(|s| s.to_str().unwrap_or("tmkms"))
.unwrap_or_else(|| "tmkms");
let file_name_launch_all = format!("{}.launch_all.toml", file_stem);
let cp_launch_all = cp.with_file_name(file_name_launch_all);
let cp_launch_all = config_path.with_file_name(file_name_launch_all);

let nitro_sign_opt = NitroSignOpt {
aws_region: aws_region.clone(),
Expand All @@ -50,7 +49,7 @@ pub fn init(
.map_err(|e| format!("failed to create a config in toml: {:?}", e))?;
let t_launch_all = toml::to_string(&all_config)
.map_err(|e| format!("failed to create a config in toml: {:?}", e))?;
fs::write(cp, t).map_err(|e| format!("failed to write a config: {:?}", e))?;
fs::write(config_path, t).map_err(|e| format!("failed to write a config: {:?}", e))?;
fs::write(cp_launch_all, t_launch_all)
.map_err(|e| format!("failed to write a luanch all config: {:?}", e))?;
let config = all_config.sign_opt;
Expand Down
29 changes: 0 additions & 29 deletions providers/nitro/nitro-helper/src/command/vsock_proxy.rs

This file was deleted.

4 changes: 2 additions & 2 deletions providers/nitro/nitro-helper/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ enum CommandHelper {
#[structopt(name = "init", about = "Create config + keygen")]
/// Create config + keygen
Init {
#[structopt(short)]
config_path: Option<PathBuf>,
#[structopt(short, default_value = "tmkms.toml")]
config_path: PathBuf,
#[structopt(short)]
pubkey_display: Option<PubkeyDisplay>,
#[structopt(short)]
Expand Down

0 comments on commit ab3100b

Please sign in to comment.