mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-25 21:17:17 +00:00
Fix validator_monitor_prev_epoch_ metrics (#2911)
## Issue Addressed #2820 ## Proposed Changes The problem is that validator_monitor_prev_epoch metrics are updated only if there is EpochSummary present in summaries map for the previous epoch and it is not the case for the offline validator. Ensure that EpochSummary is inserted into summaries map also for the offline validators.
This commit is contained in:
parent
f428719761
commit
a9e158663b
@ -231,6 +231,11 @@ impl MonitoredValidator {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Ensure epoch summary is added to the summaries map
|
||||
fn touch_epoch_summary(&self, epoch: Epoch) {
|
||||
self.with_epoch_summary(epoch, |_| {});
|
||||
}
|
||||
}
|
||||
|
||||
/// Holds a collection of `MonitoredValidator` and is notified about a variety of events on the P2P
|
||||
@ -306,6 +311,7 @@ impl<T: EthSpec> ValidatorMonitor<T> {
|
||||
// Update metrics for individual validators.
|
||||
for monitored_validator in self.validators.values() {
|
||||
if let Some(i) = monitored_validator.index {
|
||||
monitored_validator.touch_epoch_summary(current_epoch);
|
||||
let i = i as usize;
|
||||
let id = &monitored_validator.id;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user