瀏覽代碼

clap-utils: Forbid multiple values for `--signer` (#34482)

* clap-utils: Do not allow multiple values for --signer

* Add changelog entry
Jon C 1 年之前
父節點
當前提交
08082df879
共有 3 個文件被更改,包括 3 次插入1 次删除
  1. 1 0
      CHANGELOG.md
  2. 1 0
      clap-utils/src/offline.rs
  3. 1 1
      clap-v3-utils/src/offline.rs

+ 1 - 0
CHANGELOG.md

@@ -28,6 +28,7 @@ Release channels have their own copy of this changelog:
   * RPC's `simulateTransaction` now returns `innerInstructions` as `json`/`jsonParsed` (#34313).
   * RPC's `simulateTransaction` now returns `innerInstructions` as `json`/`jsonParsed` (#34313).
   * Bigtable upload now includes entry summary data for each slot, stored in a
   * Bigtable upload now includes entry summary data for each slot, stored in a
     new `entries` table
     new `entries` table
+  * Forbid multiple values for the `--signer` CLI flag, forcing users to specify multiple occurrences of `--signer`, one for each signature
 * Upgrade Notes
 * Upgrade Notes
   * `solana-program` and `solana-sdk` default to support for Borsh v1, with
   * `solana-program` and `solana-sdk` default to support for Borsh v1, with
 limited backward compatibility for v0.10 and v0.9. Please upgrade to Borsh v1.
 limited backward compatibility for v0.10 and v0.9. Please upgrade to Borsh v1.

+ 1 - 0
clap-utils/src/offline.rs

@@ -52,6 +52,7 @@ fn signer_arg<'a, 'b>() -> Arg<'a, 'b> {
         .validator(is_pubkey_sig)
         .validator(is_pubkey_sig)
         .requires(BLOCKHASH_ARG.name)
         .requires(BLOCKHASH_ARG.name)
         .multiple(true)
         .multiple(true)
+        .number_of_values(1)
         .help(SIGNER_ARG.help)
         .help(SIGNER_ARG.help)
 }
 }
 
 

+ 1 - 1
clap-v3-utils/src/offline.rs

@@ -53,7 +53,7 @@ fn signer_arg<'a>() -> Arg<'a> {
         .value_parser(value_parser!(PubkeySignature))
         .value_parser(value_parser!(PubkeySignature))
         .requires(BLOCKHASH_ARG.name)
         .requires(BLOCKHASH_ARG.name)
         .multiple_occurrences(true)
         .multiple_occurrences(true)
-        .multiple_values(true)
+        .multiple_values(false)
         .help(SIGNER_ARG.help)
         .help(SIGNER_ARG.help)
 }
 }