Skip to content

Commit 0cc54d0

Browse files
committed
update sync service
1 parent e717aa2 commit 0cc54d0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/sync/sync_service.go

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

35-
// TODO: when we add pruning we can remove this
36-
const ninetyNineYears = 99 * 365 * 24 * time.Hour
37-
3835
// SyncService is the P2P Sync Service for blocks and headers.
3936
//
4037
// Uses the go-header library for handling all P2P logic.
@@ -448,9 +445,12 @@ func newSyncer[H header.Header[H]](
448445
sub header.Subscriber[H],
449446
opts []goheadersync.Option,
450447
) (*goheadersync.Syncer[H], error) {
448+
// using a very long duration for effectively disabling pruning and trusting period checks.
449+
const ninetyNineYears = 99 * 365 * 24 * time.Hour
450+
451451
opts = append(opts,
452452
goheadersync.WithMetrics(),
453-
goheadersync.WithPruningWindow(ninetyNineYears),
453+
goheadersync.WithPruningWindow(ninetyNineYears), // pruning window not relevant, because of the store wrapper.
454454
goheadersync.WithTrustingPeriod(ninetyNineYears),
455455
)
456456
return goheadersync.NewSyncer(ex, store, sub, opts...)

0 commit comments

Comments
 (0)