mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 08:37:37 +00:00
Fix reported effective balance for unknown/pending validators (#12693)
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This commit is contained in:
parent
56a0315dde
commit
d2ff995eb2
@ -255,9 +255,11 @@ func (v *validator) LogValidatorGainsAndLosses(ctx context.Context, slot primiti
|
||||
}
|
||||
|
||||
if v.emitAccountMetrics {
|
||||
// There is no distinction between unknown and pending validators here.
|
||||
// The balance is recorded as 0, as this metric is the effective balance of a participating validator.
|
||||
for _, missingPubKey := range resp.MissingValidators {
|
||||
fmtKey := fmt.Sprintf("%#x", missingPubKey)
|
||||
ValidatorBalancesGaugeVec.WithLabelValues(fmtKey).Set(float64(params.BeaconConfig().MaxEffectiveBalance) / float64(params.BeaconConfig().GweiPerEth))
|
||||
ValidatorBalancesGaugeVec.WithLabelValues(fmtKey).Set(0)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user