epoch_rewards datapoint now includes the correct rewards epoch (previous epoch) (#12582)
(cherry picked from commit f57af4fec2
)
Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
@ -1158,7 +1158,7 @@ impl Bank {
|
|||||||
.fetch_add(validator_rewards_paid, Ordering::Relaxed);
|
.fetch_add(validator_rewards_paid, Ordering::Relaxed);
|
||||||
|
|
||||||
let active_stake = if let Some(stake_history_entry) =
|
let active_stake = if let Some(stake_history_entry) =
|
||||||
self.stakes.read().unwrap().history().get(&self.epoch)
|
self.stakes.read().unwrap().history().get(&prev_epoch)
|
||||||
{
|
{
|
||||||
stake_history_entry.effective
|
stake_history_entry.effective
|
||||||
} else {
|
} else {
|
||||||
@ -1168,7 +1168,7 @@ impl Bank {
|
|||||||
datapoint_warn!(
|
datapoint_warn!(
|
||||||
"epoch_rewards",
|
"epoch_rewards",
|
||||||
("slot", self.slot, i64),
|
("slot", self.slot, i64),
|
||||||
("epoch", self.epoch, i64),
|
("epoch", prev_epoch, i64),
|
||||||
("validator_rate", validator_rate, f64),
|
("validator_rate", validator_rate, f64),
|
||||||
("foundation_rate", foundation_rate, f64),
|
("foundation_rate", foundation_rate, f64),
|
||||||
("epoch_duration_in_years", epoch_duration_in_years, f64),
|
("epoch_duration_in_years", epoch_duration_in_years, f64),
|
||||||
|
Reference in New Issue
Block a user