Skip to content

Commit

Permalink
fix after review
Browse files Browse the repository at this point in the history
  • Loading branch information
BeniaminDrasovean committed Dec 11, 2024
1 parent 0ec0695 commit fee796f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions storage/pruning/pruningStorer.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ func (ps *PruningStorer) changeEpoch(header data.HeaderHandler) error {
}
log.Debug("change epoch pruning storer success", "persister", ps.identifier, "epoch", epoch)

return ps.removeOldPersistersIfNeeded(header, epoch)
return ps.removeOldPersistersIfNeeded(header)
}

shardID := core.GetShardIDString(ps.shardCoordinator.SelfId())
Expand All @@ -802,10 +802,11 @@ func (ps *PruningStorer) changeEpoch(header data.HeaderHandler) error {
ps.activePersisters = append(singleItemPersisters, ps.activePersisters...)
ps.persistersMapByEpoch[epoch] = newPersister

return ps.removeOldPersistersIfNeeded(header, epoch)
return ps.removeOldPersistersIfNeeded(header)
}

func (ps *PruningStorer) removeOldPersistersIfNeeded(header data.HeaderHandler, epoch uint32) error {
func (ps *PruningStorer) removeOldPersistersIfNeeded(header data.HeaderHandler) error {
epoch := header.GetEpoch()
wasExtended := ps.extendSavedEpochsIfNeeded(header)
if wasExtended {
if len(ps.activePersisters) > int(ps.numOfActivePersisters) {
Expand Down

0 comments on commit fee796f

Please sign in to comment.