Skip to content

Commit

Permalink
chore(dot/sync): use constant for maxTaskRetries
Browse files Browse the repository at this point in the history
  • Loading branch information
haikoschol committed Oct 22, 2024
1 parent bae1fe4 commit 3da46d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dot/sync/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
const (
waitPeersDefaultTimeout = 10 * time.Second
minPeersDefault = 1
maxTaskRetries = 5
)

var (
Expand Down Expand Up @@ -120,7 +121,7 @@ func NewSyncService(cfgs ...ServiceConfig) *SyncService {
stopCh: make(chan struct{}),
seenBlockSyncRequests: lrucache.NewLRUCache[common.Hash, uint](100),
workerPool: NewWorkerPool(WorkerPoolConfig{
MaxRetries: 5,
MaxRetries: maxTaskRetries,
// TODO: This should depend on the actual configuration of the currently used sync strategy.
Capacity: defaultNumOfTasks * 10,
}),
Expand Down

0 comments on commit 3da46d9

Please sign in to comment.