Skip to content

Commit

Permalink
Move pruning log to after retention check (#13348)
Browse files Browse the repository at this point in the history
  • Loading branch information
terencechain authored Dec 15, 2023
1 parent ddcf0c1 commit 53bc968
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions beacon-chain/db/filesystem/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ func (p blobNamer) path() string {
// It deletes blobs older than currentEpoch - (retentionEpochs+bufferEpochs).
// This is so that we keep a slight buffer and blobs are deleted after n+2 epochs.
func (bs *BlobStorage) Prune(currentSlot primitives.Slot) error {
log.Debug("Pruning old blobs")

t := time.Now()
retentionSlots, err := slots.EpochStart(bs.retentionEpochs + bufferEpochs)
if err != nil {
Expand All @@ -243,6 +241,8 @@ func (bs *BlobStorage) Prune(currentSlot primitives.Slot) error {
return nil // Overflow would occur
}

log.Debug("Pruning old blobs")

folders, err := afero.ReadDir(bs.fs, ".")
if err != nil {
return err
Expand Down

0 comments on commit 53bc968

Please sign in to comment.