Skip to content

Commit 5c30004

Browse files
committed
updares
1 parent 4f482ae commit 5c30004

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

block/internal/syncing/syncer.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,13 @@ func (s *Syncer) syncLoop() {
268268

269269
// wait for pending events processing, p2p and da fetching
270270
wg.Wait()
271+
272+
// Prevent busy-waiting when no events are processed
273+
select {
274+
case <-s.ctx.Done():
275+
return
276+
case <-time.After(min(100*time.Millisecond, s.config.Node.BlockTime.Duration)):
277+
}
271278
}
272279
}
273280

0 commit comments

Comments
 (0)