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

* Make commitment a global arg

* Add commitment to solana/cli/config.yml

* Fixup a couple Display/Verbose bugs

(cherry picked from commit a7086a0f83)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
This commit is contained in:
mergify[bot]
2021-01-20 18:04:25 +00:00
committed by GitHub
parent a2ce22f11b
commit 459ae81655
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,
}
}
}