Round robin: half open interval in syncToFinalizedEpoch (#8039)

This commit is contained in:
Victor Farazdagi 2020-12-04 00:55:42 +03:00 committed by GitHub
parent c090c6a1c5
commit 647b4cf108
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,10 +69,6 @@ func (s *Service) syncToFinalizedEpoch(ctx context.Context, genesis time.Time) e
if err != nil { if err != nil {
return err return err
} }
// Step back one slot, to the last slot of the finalized epoch (we're at first slot of the next epoch).
if highestFinalizedSlot > 0 {
highestFinalizedSlot--
}
if s.chain.HeadSlot() >= highestFinalizedSlot { if s.chain.HeadSlot() >= highestFinalizedSlot {
// No need to sync, already synced to the finalized slot. // No need to sync, already synced to the finalized slot.
log.Debug("Already synced to finalized epoch") log.Debug("Already synced to finalized epoch")