solana validators
now shows current epoch credits instead of lifetime credits
This commit is contained in:
@ -338,7 +338,7 @@ impl fmt::Display for CliValidators {
|
|||||||
|
|
||||||
writeln!(
|
writeln!(
|
||||||
f,
|
f,
|
||||||
"{} {:<44} {:<44} {:>3}% {:>8} {:>10} {:>10} {:>8} {}",
|
"{} {:<44} {:<44} {:>3}% {:>8} {:>10} {:>13} {:>7} {}",
|
||||||
if delinquent {
|
if delinquent {
|
||||||
WARNING.to_string()
|
WARNING.to_string()
|
||||||
} else {
|
} else {
|
||||||
@ -366,13 +366,13 @@ impl fmt::Display for CliValidators {
|
|||||||
f,
|
f,
|
||||||
"{}",
|
"{}",
|
||||||
style(format!(
|
style(format!(
|
||||||
" {:<44} {:<38} {} {} {} {:>10} {:^8} {}",
|
" {:<44} {:<38} {} {} {} {:>11} {:^7} {}",
|
||||||
"Identity",
|
"Identity",
|
||||||
"Vote Account",
|
"Vote Account",
|
||||||
"Commission",
|
"Commission",
|
||||||
"Last Vote",
|
"Last Vote",
|
||||||
"Root Block",
|
"Root Block",
|
||||||
"Credits",
|
"Epoch Credits",
|
||||||
"Version",
|
"Version",
|
||||||
"Active Stake",
|
"Active Stake",
|
||||||
))
|
))
|
||||||
@ -482,9 +482,9 @@ impl CliValidator {
|
|||||||
credits: vote_account
|
credits: vote_account
|
||||||
.epoch_credits
|
.epoch_credits
|
||||||
.iter()
|
.iter()
|
||||||
.find_map(|(epoch, credits, _)| {
|
.find_map(|(epoch, credits, pre_credits)| {
|
||||||
if *epoch == current_epoch {
|
if *epoch == current_epoch {
|
||||||
Some(*credits)
|
Some(credits.saturating_sub(*pre_credits))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user