From d5d06e6be0e993aa38fa4ad5a8f0f184afa67105 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 19 May 2020 13:45:21 -0700 Subject: [PATCH] Add CommitmentConfig::single() support to the cli (#10114) automerge --- clap-utils/src/commitment.rs | 2 +- clap-utils/src/input_parsers.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/clap-utils/src/commitment.rs b/clap-utils/src/commitment.rs index d2b2611bd5..d9332fc00e 100644 --- a/clap-utils/src/commitment.rs +++ b/clap-utils/src/commitment.rs @@ -15,7 +15,7 @@ pub fn commitment_arg_with_default<'a, 'b>(default_value: &'static str) -> Arg<' Arg::with_name(COMMITMENT_ARG.name) .long(COMMITMENT_ARG.long) .takes_value(true) - .possible_values(&["recent", "root", "max"]) + .possible_values(&["recent", "single", "root", "max"]) .default_value(default_value) .value_name("COMMITMENT_LEVEL") .help(COMMITMENT_ARG.help) diff --git a/clap-utils/src/input_parsers.rs b/clap-utils/src/input_parsers.rs index 05f546c1b3..d2624e71e2 100644 --- a/clap-utils/src/input_parsers.rs +++ b/clap-utils/src/input_parsers.rs @@ -183,6 +183,7 @@ pub fn commitment_of(matches: &ArgMatches<'_>, name: &str) -> Option CommitmentConfig::max(), "recent" => CommitmentConfig::recent(), "root" => CommitmentConfig::root(), + "single" => CommitmentConfig::single(), _ => CommitmentConfig::default(), }) }