Cli: promote commitment to a global arg + config.yml (#14684)

* Make commitment a global arg

* Add commitment to solana/cli/config.yml

* Fixup a couple Display/Verbose bugs
This commit is contained in:
Tyera Eulberg
2021-01-20 09:48:10 -07:00
committed by GitHub
parent ed90ef76d4
commit a7086a0f83
11 changed files with 153 additions and 102 deletions

View File

@@ -12,10 +12,7 @@ use clap::{App, AppSettings, Arg, ArgMatches, SubCommand};
use log::*;
use serde_json::{self, json};
use solana_bpf_loader_program::{bpf_verifier, BPFError, ThisInstructionMeter};
use solana_clap_utils::{
self, commitment::commitment_arg_with_default, input_parsers::*, input_validators::*,
keypair::*,
};
use solana_clap_utils::{self, input_parsers::*, input_validators::*, keypair::*};
use solana_cli_output::display::new_spinner_progress_bar;
use solana_client::{
rpc_client::RpcClient, rpc_config::RpcSendTransactionConfig,
@@ -148,8 +145,7 @@ impl ProgramSubCommands for App<'_, '_> {
.long("allow-excessive-deploy-account-balance")
.takes_value(false)
.help("Use the designated program id even if the account already holds a large balance of SOL")
)
.arg(commitment_arg_with_default("singleGossip")),
),
)
.subcommand(
SubCommand::with_name("write-buffer")
@@ -191,8 +187,7 @@ impl ProgramSubCommands for App<'_, '_> {
.required(false)
.help("Maximum length of the upgradeable program \
[default: twice the length of the original deployed program]")
)
.arg(commitment_arg_with_default("singleGossip")),
),
)
.subcommand(
SubCommand::with_name("set-buffer-authority")
@@ -270,8 +265,7 @@ impl ProgramSubCommands for App<'_, '_> {
.takes_value(true)
.required(true)
.help("Public key of the account to query")
)
.arg(commitment_arg_with_default("singleGossip")),
),
)
)
}