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

@ -17,9 +17,10 @@ pub struct Config {
pub json_rpc_url: String,
pub websocket_url: String,
pub keypair_path: String,
#[serde(default)]
pub address_labels: HashMap<String, String>,
#[serde(default)]
pub commitment: String,
}
impl Default for Config {
@ -41,11 +42,14 @@ impl Default for Config {
"System Program".to_string(),
);
let commitment = "singleGossip".to_string();
Self {
json_rpc_url,
websocket_url,
keypair_path,
address_labels,
commitment,
}
}
}