Fix typo (#12780)
This commit is contained in:
@ -301,7 +301,7 @@ pub struct CliValidatorsStakeByVersion {
|
|||||||
pub struct CliValidators {
|
pub struct CliValidators {
|
||||||
pub total_active_stake: u64,
|
pub total_active_stake: u64,
|
||||||
pub total_current_stake: u64,
|
pub total_current_stake: u64,
|
||||||
pub total_deliquent_stake: u64,
|
pub total_delinquent_stake: u64,
|
||||||
pub current_validators: Vec<CliValidator>,
|
pub current_validators: Vec<CliValidator>,
|
||||||
pub delinquent_validators: Vec<CliValidator>,
|
pub delinquent_validators: Vec<CliValidator>,
|
||||||
pub stake_by_version: BTreeMap<String, CliValidatorsStakeByVersion>,
|
pub stake_by_version: BTreeMap<String, CliValidatorsStakeByVersion>,
|
||||||
@ -360,7 +360,7 @@ impl fmt::Display for CliValidators {
|
|||||||
"Active Stake:",
|
"Active Stake:",
|
||||||
&build_balance_message(self.total_active_stake, self.use_lamports_unit, true),
|
&build_balance_message(self.total_active_stake, self.use_lamports_unit, true),
|
||||||
)?;
|
)?;
|
||||||
if self.total_deliquent_stake > 0 {
|
if self.total_delinquent_stake > 0 {
|
||||||
writeln_name_value(
|
writeln_name_value(
|
||||||
f,
|
f,
|
||||||
"Current Stake:",
|
"Current Stake:",
|
||||||
@ -376,11 +376,11 @@ impl fmt::Display for CliValidators {
|
|||||||
&format!(
|
&format!(
|
||||||
"{} ({:0.2}%)",
|
"{} ({:0.2}%)",
|
||||||
&build_balance_message(
|
&build_balance_message(
|
||||||
self.total_deliquent_stake,
|
self.total_delinquent_stake,
|
||||||
self.use_lamports_unit,
|
self.use_lamports_unit,
|
||||||
true
|
true
|
||||||
),
|
),
|
||||||
100. * self.total_deliquent_stake as f64 / self.total_active_stake as f64
|
100. * self.total_delinquent_stake as f64 / self.total_active_stake as f64
|
||||||
),
|
),
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
|
@ -1405,12 +1405,12 @@ pub fn process_show_validators(
|
|||||||
.map(|vote_account| vote_account.activated_stake)
|
.map(|vote_account| vote_account.activated_stake)
|
||||||
.sum();
|
.sum();
|
||||||
|
|
||||||
let total_deliquent_stake = vote_accounts
|
let total_delinquent_stake = vote_accounts
|
||||||
.delinquent
|
.delinquent
|
||||||
.iter()
|
.iter()
|
||||||
.map(|vote_account| vote_account.activated_stake)
|
.map(|vote_account| vote_account.activated_stake)
|
||||||
.sum();
|
.sum();
|
||||||
let total_current_stake = total_active_stake - total_deliquent_stake;
|
let total_current_stake = total_active_stake - total_delinquent_stake;
|
||||||
|
|
||||||
let mut current = vote_accounts.current;
|
let mut current = vote_accounts.current;
|
||||||
current.sort_by(|a, b| b.activated_stake.cmp(&a.activated_stake));
|
current.sort_by(|a, b| b.activated_stake.cmp(&a.activated_stake));
|
||||||
@ -1464,7 +1464,7 @@ pub fn process_show_validators(
|
|||||||
let cli_validators = CliValidators {
|
let cli_validators = CliValidators {
|
||||||
total_active_stake,
|
total_active_stake,
|
||||||
total_current_stake,
|
total_current_stake,
|
||||||
total_deliquent_stake,
|
total_delinquent_stake,
|
||||||
current_validators,
|
current_validators,
|
||||||
delinquent_validators,
|
delinquent_validators,
|
||||||
stake_by_version,
|
stake_by_version,
|
||||||
|
Reference in New Issue
Block a user