mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 19:40:37 +00:00
Move pruning log to after retention check (#13348)
This commit is contained in:
parent
ddcf0c18dc
commit
53bc96844e
@ -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 {
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user