Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Sort offline/wrong-shred nodes by stake weight while waiting for supe…
Browse files Browse the repository at this point in the history
…rmajority (#28872)

(cherry picked from commit c692715)
  • Loading branch information
mvines authored and mergify[bot] committed Nov 18, 2022
1 parent 7221f91 commit b1a2e12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2015,6 +2015,7 @@ fn get_stake_percent_in_gossip(bank: &Bank, cluster_info: &ClusterInfo, log: boo
"{:.3}% of active stake has the wrong shred version in gossip",
(wrong_shred_stake as f64 / total_activated_stake as f64) * 100.,
);
wrong_shred_nodes.sort_by(|b, a| a.0.cmp(&b.0)); // sort by reverse stake weight
for (stake, identity) in wrong_shred_nodes {
info!(
" {:.3}% - {}",
Expand All @@ -2029,6 +2030,7 @@ fn get_stake_percent_in_gossip(bank: &Bank, cluster_info: &ClusterInfo, log: boo
"{:.3}% of active stake is not visible in gossip",
(offline_stake as f64 / total_activated_stake as f64) * 100.
);
offline_nodes.sort_by(|b, a| a.0.cmp(&b.0)); // sort by reverse stake weight
for (stake, identity) in offline_nodes {
info!(
" {:.3}% - {}",
Expand Down

0 comments on commit b1a2e12

Please sign in to comment.