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

solana validators now shows current epoch credits instead of lifetime credits #16635

Merged
merged 1 commit into from
Apr 19, 2021
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
10 changes: 5 additions & 5 deletions cli-output/src/cli_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ impl fmt::Display for CliValidators {

writeln!(
f,
"{} {:<44} {:<44} {:>3}% {:>8} {:>10} {:>10} {:>8} {}",
"{} {:<44} {:<44} {:>3}% {:>8} {:>10} {:>13} {:>7} {}",
if delinquent {
WARNING.to_string()
} else {
Expand Down Expand Up @@ -366,13 +366,13 @@ impl fmt::Display for CliValidators {
f,
"{}",
style(format!(
" {:<44} {:<38} {} {} {} {:>10} {:^8} {}",
" {:<44} {:<38} {} {} {} {:>11} {:^7} {}",
"Identity",
"Vote Account",
"Commission",
"Last Vote",
"Root Block",
"Credits",
"Epoch Credits",
"Version",
"Active Stake",
))
Expand Down Expand Up @@ -482,9 +482,9 @@ impl CliValidator {
credits: vote_account
.epoch_credits
.iter()
.find_map(|(epoch, credits, _)| {
.find_map(|(epoch, credits, pre_credits)| {
if *epoch == current_epoch {
Some(*credits)
Some(credits.saturating_sub(*pre_credits))
} else {
None
}
Expand Down