Fix slasher historic attestation detection (#5532)

* fix slasher historic attestation detection

* revert log changes
This commit is contained in:
Shay Zluf 2020-04-20 19:11:53 +03:00 committed by GitHub
parent 639e3072fe
commit fae307e5a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,10 +137,10 @@ func (ds *Service) detectHistoricalChainData(ctx context.Context) {
}
ds.submitAttesterSlashings(ctx, slashings)
}
}
if err := ds.slasherDB.SaveChainHead(ctx, currentChainHead); err != nil {
log.WithError(err).Error("Could not persist chain head to disk")
latestStoredHead = &ethpb.ChainHead{HeadEpoch: epoch}
if err := ds.slasherDB.SaveChainHead(ctx, latestStoredHead); err != nil {
log.WithError(err).Error("Could not persist chain head to disk")
}
}
log.Infof("Completed slashing detection on historical chain data up to epoch %d", currentChainHead.HeadEpoch)
}