Use singleGossip for program deployment

This commit is contained in:
Michael Vines
2021-01-01 23:09:45 -08:00
parent 5affd8aa72
commit c63e14dd0e
3 changed files with 19 additions and 11 deletions

View File

@@ -182,11 +182,16 @@ pub fn parse_args<'a>(
OutputFormat::Display
});
let commitment = matches
.subcommand_name()
.and_then(|name| matches.subcommand_matches(name))
.and_then(|sub_matches| commitment_of(sub_matches, COMMITMENT_ARG.long))
.unwrap_or_default();
let commitment = {
let mut sub_matches = matches;
while let Some(subcommand_name) = sub_matches.subcommand_name() {
sub_matches = sub_matches
.subcommand_matches(subcommand_name)
.expect("subcommand_matches");
}
commitment_of(sub_matches, COMMITMENT_ARG.long)
}
.unwrap_or_default();
let address_labels = if matches.is_present("no_address_labels") {
HashMap::new()