mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-05-02 03:02:54 -04:00
Save finalized checkpoint before migrate to cold (#7055)
* Save finalized checkpoint before migrate to cold * Save finalized checkpoint before migrate to cold * Merge branch 'master' into save-checkpoint-first
This commit is contained in:
@@ -226,6 +226,11 @@ func (s *Service) updateFinalized(ctx context.Context, cp *ethpb.Checkpoint) err
|
||||
return err
|
||||
}
|
||||
s.clearInitSyncBlocks()
|
||||
s.attPool.ClearSeenAtts()
|
||||
|
||||
if err := s.beaconDB.SaveFinalizedCheckpoint(ctx, cp); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
s.prevFinalizedCheckpt = s.finalizedCheckpt
|
||||
s.finalizedCheckpt = cp
|
||||
@@ -235,9 +240,7 @@ func (s *Service) updateFinalized(ctx context.Context, cp *ethpb.Checkpoint) err
|
||||
return errors.Wrap(err, "could not migrate to cold")
|
||||
}
|
||||
|
||||
s.attPool.ClearSeenAtts()
|
||||
|
||||
return s.beaconDB.SaveFinalizedCheckpoint(ctx, cp)
|
||||
return nil
|
||||
}
|
||||
|
||||
// ancestor returns the block root of an ancestry block from the input block root.
|
||||
|
||||
Reference in New Issue
Block a user