fix write params

This commit is contained in:
Roy Crihfield 2023-06-22 12:18:35 +08:00
parent ed546f1c23
commit ddfc3e6509

View File

@ -169,6 +169,7 @@ func NewService(cfg Config, blockChain BlockChain, backend plugeth.Backend, inde
maxRetry: defaultRetryLimit, maxRetry: defaultRetryLimit,
jobStatusSubs: map[SubID]jobStatusSubscription{}, jobStatusSubs: map[SubID]jobStatusSubscription{},
currentJobs: map[uint64]JobID{}, currentJobs: map[uint64]JobID{},
writeLoopParams: ParamsWithMutex{Params: defaultWriteLoopParams},
} }
if indexer != nil { if indexer != nil {
@ -177,8 +178,6 @@ func NewService(cfg Config, blockChain BlockChain, backend plugeth.Backend, inde
return nil, err return nil, err
} }
indexer.ReportDBMetrics(10*time.Second, quitCh) indexer.ReportDBMetrics(10*time.Second, quitCh)
} else {
sds.writeLoopParams.Params = defaultWriteLoopParams
} }
return sds, nil return sds, nil
} }