Skip to content

Commit

Permalink
cli: improve feature status arithmatic readability
Browse files Browse the repository at this point in the history
  • Loading branch information
t-nelson committed Oct 23, 2021
1 parent 30d277b commit d98c8b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/src/feature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ fn feature_set_stats(rpc_client: &RpcClient) -> Result<FeatureSetStats, ClientEr
software_versions,
},
)| {
let stake_percent = stake as f64 * 100. / total_active_stake as f64;
let rpc_nodes_percent = rpc_nodes_count as f32 * 100. / total_rpc_nodes as f32;
let stake_percent = (stake as f64 / total_active_stake as f64) * 100.;
let rpc_nodes_percent = (rpc_nodes_count as f32 / total_rpc_nodes as f32) * 100.;
let mut software_versions = software_versions.into_iter().collect::<Vec<_>>();
software_versions.sort();
if stake_percent >= 0.001 || rpc_nodes_percent >= 0.001 {
Expand Down

0 comments on commit d98c8b8

Please sign in to comment.