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

This commit is contained in:
Michael Vines 2022-11-18 15:26:21 -08:00 committed by GitHub
parent d698f982ee
commit c6927151ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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}% - {}",
@ -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}% - {}",