From 8752bf0826bc7f37f092a77fcd18b49a0e3dc3e9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2020 07:14:49 +0000 Subject: [PATCH] Skip 'Stake by Feature Set' output when showing status of a single feature (#13052) (cherry picked from commit ad65d4785e45f0440ebd01888f38574c1e1fa31d) Co-authored-by: Michael Vines --- cli/src/feature.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cli/src/feature.rs b/cli/src/feature.rs index 527360aa0e..0ea6393c8a 100644 --- a/cli/src/feature.rs +++ b/cli/src/feature.rs @@ -230,7 +230,7 @@ fn active_stake_by_feature_set(rpc_client: &RpcClient) -> Result Result { +fn feature_activation_allowed(rpc_client: &RpcClient, quiet: bool) -> Result { let my_feature_set = solana_version::Version::default().feature_set; let active_stake_by_feature_set = active_stake_by_feature_set(rpc_client)?; @@ -240,8 +240,8 @@ fn feature_activation_allowed(rpc_client: &RpcClient) -> Result= 95) .unwrap_or(false); - if !feature_activation_allowed { - println!("\n{}", style("Stake By Feature Set:").bold()); + if !feature_activation_allowed && !quiet { + println!("{}", style("Stake By Feature Set:").bold()); for (feature_set, percentage) in active_stake_by_feature_set.iter() { if *feature_set == 0 { println!("unknown - {}%", percentage); @@ -258,6 +258,7 @@ fn feature_activation_allowed(rpc_client: &RpcClient) -> Result