From f57af4fec224668d54579e9dc0db524809e28eba Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 29 Sep 2020 21:26:45 -0700 Subject: [PATCH] epoch_rewards datapoint now includes the correct rewards epoch (previous epoch) --- runtime/src/bank.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 3ff71c8931..a2381c8c61 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -1154,7 +1154,7 @@ impl Bank { .fetch_add(validator_rewards_paid, Relaxed); 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 } else { @@ -1164,7 +1164,7 @@ impl Bank { datapoint_warn!( "epoch_rewards", ("slot", self.slot, i64), - ("epoch", self.epoch, i64), + ("epoch", prev_epoch, i64), ("validator_rate", validator_rate, f64), ("foundation_rate", foundation_rate, f64), ("epoch_duration_in_years", epoch_duration_in_years, f64),