ledger-tool: Workaround clap bug for encoding arg in genesis command (#32626)

The --encoding flag only makes sense for the genesis command if the
genesis accounts will be printed. Hence, the encoding flag used the
Arg::requires() function on --accounts argument.

However, in what appears to be a clap bug, this made the --accounts flag
required even though it should not be. So, remove the .requires()
dependency between these two arguments.
This commit is contained in:
steviez 2023-07-26 13:25:56 -05:00 committed by GitHub
parent 9a17203811
commit 9980771788
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1488,7 +1488,7 @@ fn main() {
.requires("accounts")
.help("Do not print account data when printing account contents."),
)
.arg(&accounts_data_encoding_arg.clone().requires("accounts"))
.arg(&accounts_data_encoding_arg)
)
.subcommand(
SubCommand::with_name("genesis-hash")