mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 00:27:38 +00:00
Display Num Pruned Items in Slasher Only When Actually Prunes (#9989)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
2bcda2e021
commit
1eff00fb33
@ -216,10 +216,14 @@ func (s *Service) pruneSlasherDataWithinSlidingWindow(ctx context.Context, curre
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "Could not prune proposals")
|
return errors.Wrap(err, "Could not prune proposals")
|
||||||
}
|
}
|
||||||
log.WithFields(logrus.Fields{
|
fields := logrus.Fields{}
|
||||||
"prunedAttestationRecords": numPrunedAtts,
|
if numPrunedAtts > 0 {
|
||||||
"prunedProposalRecords": numPrunedProposals,
|
fields["numPrunedAtts"] = numPrunedAtts
|
||||||
"elapsed": time.Since(start),
|
}
|
||||||
}).Info("Successfully ran slasher data pruning")
|
if numPrunedProposals > 0 {
|
||||||
|
fields["numPrunedProposals"] = numPrunedProposals
|
||||||
|
}
|
||||||
|
fields["elapsed"] = time.Since(start)
|
||||||
|
log.WithFields(fields).Info("Done pruning old attestations and proposals for slasher")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user