Skip to content

Commit

Permalink
fix create prunning storer maps epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
ssd04 committed Nov 6, 2023
1 parent c192ba4 commit d2f3f82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions storage/factory/storageServiceFactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,6 @@ func (psf *StorageServiceFactory) createTriePersister(
}

func (psf *StorageServiceFactory) createTriePruningPersister(arg pruning.StorerArgs) (storage.Storer, error) {
arg.StateStatsHandler = psf.stateStatsHandler

isFullArchive := psf.prefsConfig.FullArchive
isDBLookupExtension := psf.generalConfig.DbLookupExtensions.Enabled
if !isFullArchive && !isDBLookupExtension {
Expand Down
4 changes: 3 additions & 1 deletion storage/pruning/pruningStorer.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,13 @@ func createPersisterIfPruningDisabled(
var persisters []*persisterData
persistersMapByEpoch := make(map[uint32]*persisterData)

p, err := createPersisterDataForEpoch(args, 0, shardIDStr)
epoch := uint32(0)
p, err := createPersisterDataForEpoch(args, epoch, shardIDStr)
if err != nil {
return nil, nil, err
}
persisters = append(persisters, p)
persistersMapByEpoch[epoch] = p

return persisters, persistersMapByEpoch, nil
}
Expand Down

0 comments on commit d2f3f82

Please sign in to comment.