Skip to content

Commit

Permalink
CLI: Move solana validators summary to end of output
Browse files Browse the repository at this point in the history
  • Loading branch information
t-nelson authored and mergify[bot] committed Feb 3, 2021
1 parent 894b412 commit 31d30bb
Showing 1 changed file with 36 additions and 35 deletions.
71 changes: 36 additions & 35 deletions cli-output/src/cli_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,42 @@ impl fmt::Display for CliValidators {
},
)
}
writeln!(
f,
"{}",
style(format!(
" {:<44} {:<38} {} {} {} {:>10} {:^8} {}",
"Identity",
"Vote Account",
"Commission",
"Last Vote",
"Root Block",
"Credits",
"Version",
"Active Stake",
))
.bold()
)?;
for validator in &self.current_validators {
write_vote_account(
f,
validator,
self.total_active_stake,
self.use_lamports_unit,
false,
)?;
}
for validator in &self.delinquent_validators {
write_vote_account(
f,
validator,
self.total_active_stake,
self.use_lamports_unit,
true,
)?;
}

writeln!(f)?;
writeln_name_value(
f,
"Active Stake:",
Expand Down Expand Up @@ -410,41 +446,6 @@ impl fmt::Display for CliValidators {
)?;
}

writeln!(f)?;
writeln!(
f,
"{}",
style(format!(
" {:<44} {:<38} {} {} {} {:>10} {:^8} {}",
"Identity",
"Vote Account",
"Commission",
"Last Vote",
"Root Block",
"Credits",
"Version",
"Active Stake",
))
.bold()
)?;
for validator in &self.current_validators {
write_vote_account(
f,
validator,
self.total_active_stake,
self.use_lamports_unit,
false,
)?;
}
for validator in &self.delinquent_validators {
write_vote_account(
f,
validator,
self.total_active_stake,
self.use_lamports_unit,
true,
)?;
}
Ok(())
}
}
Expand Down

0 comments on commit 31d30bb

Please sign in to comment.