Skip to content

Commit 1f3212b

Browse files
fix(pkg/sync): avoid pruning goheader store (#2718)
<!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. NOTE: PR titles should follow semantic commits: https://www.conventionalcommits.org/en/v1.0.0/ --> ## Overview <!-- Please provide an explanation of the PR, including the appropriate context, background, goal, and rationale. If there is an issue with this information, please provide a tl;dr and link the issue. Ex: Closes #<issue number> --> avoid pruning data and headers from store for now, we will add pruning back in the future --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 94e545a commit 1f3212b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/sync/sync_service.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ const (
3333
dataSync syncType = "dataSync"
3434
)
3535

36+
// TODO: when we add pruning we can remove this
37+
const ninetyNineYears = 99 * 365 * 24 * time.Hour
38+
3639
// SyncService is the P2P Sync Service for blocks and headers.
3740
//
3841
// Uses the go-header library for handling all P2P logic.
@@ -388,6 +391,7 @@ func newSyncer[H header.Header[H]](
388391
) (*goheadersync.Syncer[H], error) {
389392
opts = append(opts,
390393
goheadersync.WithMetrics(),
394+
goheadersync.WithPruningWindow(ninetyNineYears),
391395
)
392396
return goheadersync.NewSyncer(ex, store, sub, opts...)
393397
}

0 commit comments

Comments
 (0)