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

Sort offline/wrong-shred nodes by stake weight while waiting for supermajority #28872

Merged
merged 1 commit into from
Nov 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1997,6 +1997,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 @@ -2011,6 +2012,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