more informative feature error message (#13373)

This commit is contained in:
Jack May
2020-11-03 16:08:08 -08:00
committed by GitHub
parent 3d5e778d5d
commit 04c5e6cc48

View File

@ -242,7 +242,22 @@ fn feature_activation_allowed(rpc_client: &RpcClient, quiet: bool) -> Result<boo
.unwrap_or(false); .unwrap_or(false);
if !feature_activation_allowed && !quiet { if !feature_activation_allowed && !quiet {
println!("{}", style("Stake By Feature Set:").bold()); if active_stake_by_feature_set.get(&my_feature_set).is_none() {
println!(
"{}",
style("To activate features the tool and cluster feature sets must match, select a tool version that matches the cluster")
.bold());
} else {
println!(
"{}",
style("To activate features the stake must be >= 95%").bold()
);
}
println!(
"{}",
style(format!("Tool Feture Set: {}", my_feature_set)).bold()
);
println!("{}", style("Cluster Feature Sets and Stakes:").bold());
for (feature_set, percentage) in active_stake_by_feature_set.iter() { for (feature_set, percentage) in active_stake_by_feature_set.iter() {
if *feature_set == 0 { if *feature_set == 0 {
println!("unknown - {}%", percentage); println!("unknown - {}%", percentage);