We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f482ae commit 5c30004Copy full SHA for 5c30004
1 file changed
block/internal/syncing/syncer.go
@@ -268,6 +268,13 @@ func (s *Syncer) syncLoop() {
268
269
// wait for pending events processing, p2p and da fetching
270
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
+ }
278
}
279
280
0 commit comments