File tree Expand file tree Collapse file tree 1 file changed +4
-25
lines changed
Expand file tree Collapse file tree 1 file changed +4
-25
lines changed Original file line number Diff line number Diff line change @@ -240,37 +240,16 @@ func (s *Syncer) syncLoop() {
240240 // Backoff control when DA replies with errors
241241 nextDARequestAt := & time.Time {}
242242
243- blockTicker := time .NewTicker (s .config .Node .BlockTime .Duration )
244- defer blockTicker .Stop ()
245-
246243 for {
247- wg := sync.WaitGroup {}
248-
249244 select {
250245 case <- s .ctx .Done ():
251246 return
252247 default :
253248 }
254- wg .Add (1 )
255- go func () {
256- defer wg .Done ()
257- s .processPendingEvents ()
258- }()
259-
260- wg .Add (1 )
261- go func () {
262- defer wg .Done ()
263- s .tryFetchFromP2P ()
264- }()
265-
266- wg .Add (1 )
267- go func () {
268- defer wg .Done ()
269- s .tryFetchFromDA (nextDARequestAt )
270- }()
271-
272- // wait for pending events processing, p2p and da fetching
273- wg .Wait ()
249+
250+ s .processPendingEvents ()
251+ s .tryFetchFromP2P ()
252+ s .tryFetchFromDA (nextDARequestAt )
274253
275254 // Prevent busy-waiting when no events are processed
276255 select {
You can’t perform that action at this time.
0 commit comments