Skip to content

Commit

Permalink
feat: simplified zebra config path
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirko-von-Leipzig committed Jul 2, 2021
1 parent 53d3aab commit 37b7e8e
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/setup/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,12 @@ impl Node {
// insert the config file cmd args
match node.meta.kind {
NodeKind::Zebra => {
// Bit more convoluted since we need to insert the args before `start`, which comes last.
let start_arg = node
.meta
.start_args
.pop()
.expect("Expected at least one arg for Zebra (`start`)");
node.meta.start_args.push("--config".into());
node.meta
.start_args
.push(node.config_filepath().into_os_string());
node.meta.start_args.push(start_arg);
let arg_len = node.meta.start_args.len();
assert!(arg_len > 1, "Expected at least one arg for Zebra (`start`)");
node.meta.start_args.insert(
arg_len - 2,
format!("--config {}", node.config_filepath().to_str().unwrap()).into(),
);
}
NodeKind::Zcashd => {
node.meta
Expand Down

0 comments on commit 37b7e8e

Please sign in to comment.