Skip to content

Commit 3e07144

Browse files
committed
don't prune go-header store
1 parent a24e09a commit 3e07144

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

pkg/sync/sync_service.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -172,21 +172,11 @@ func (syncService *SyncService[H]) Start(ctx context.Context) error {
172172
}
173173

174174
// create syncer, must be before initFromP2PWithRetry which calls startSyncer.
175-
syncOpts := []goheadersync.Option{goheadersync.WithBlockTime(syncService.conf.Node.BlockTime.Duration)}
176-
// Map ev-node pruning configuration to go-header's pruning window: we approximate
177-
// "keep N recent heights" as "retain headers for N * blockTime".
178-
if syncService.conf.Node.PruningEnabled && syncService.conf.Node.PruningKeepRecent > 0 {
179-
pruningWindow := syncService.conf.Node.BlockTime.Duration * time.Duration(syncService.conf.Node.PruningKeepRecent)
180-
// Only set a pruning window if the computed duration is positive.
181-
if pruningWindow > 0 {
182-
syncOpts = append(syncOpts, goheadersync.WithPruningWindow(pruningWindow))
183-
}
184-
}
185175
if syncService.syncer, err = newSyncer(
186176
syncService.ex,
187177
syncService.store,
188178
syncService.sub,
189-
syncOpts,
179+
[]goheadersync.Option{goheadersync.WithBlockTime(syncService.conf.Node.BlockTime.Duration)},
190180
); err != nil {
191181
return fmt.Errorf("failed to create syncer: %w", err)
192182
}

0 commit comments

Comments
 (0)