Skip to content

Commit 5e19532

Browse files
authored
Make --min-votes a named option. (#4837)
## Motivation `query-validators` allows filtering by weight. The minimum voting weight is a positional argument, which is confusing and less explicit. ## Proposal Make it a named option. ## Test Plan The change is reflected in the auto-generated `CLI.md`. ## Release Plan - These changes should be backported to `testnet_conway`, then - be released in a new SDK. (Low priority.) ## Links - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent 664e464 commit 5e19532

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CLI.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,12 +487,15 @@ Show the version and genesis config hash of a new validator, and print a warning
487487

488488
Show the current set of validators for a chain. Also print some information about the given chain while we are at it
489489

490-
**Usage:** `linera query-validators [CHAIN_ID] [MIN_VOTES]`
490+
**Usage:** `linera query-validators [OPTIONS] [CHAIN_ID]`
491491

492492
###### **Arguments:**
493493

494494
* `<CHAIN_ID>` — The chain to query. If omitted, query the default chain of the wallet
495-
* `<MIN_VOTES>` — Skip validators with less voting weight that this
495+
496+
###### **Options:**
497+
498+
* `--min-votes <MIN_VOTES>` — Skip validators with less voting weight that this
496499

497500

498501

linera-service/src/cli/command.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ pub enum ClientCommand {
351351
/// The chain to query. If omitted, query the default chain of the wallet.
352352
chain_id: Option<ChainId>,
353353
/// Skip validators with less voting weight that this.
354+
#[arg(long)]
354355
min_votes: Option<u64>,
355356
},
356357

0 commit comments

Comments
 (0)