Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions op-node/rollup/driver/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,9 @@ func (s *Driver) eventLoop() {
// requesting a new block ASAP instead of waiting for the next tick.
// We don't request a block if the confirmation depth is not met.
l2Head := s.derivation.UnsafeL2Head()
if l1Head.Number > l2Head.L1Origin.Number+s.driverConfig.SequencerConfDepth {
s.log.Trace("Building another L2 block asap to catch up with L1 head", "l2_unsafe", l2Head, "l2_unsafe_l1_origin", l2Head.L1Origin, "l1_head", l1Head)
if wallClock := uint64(time.Now().Unix()); l2Head.Time+s.config.BlockTime <= wallClock {
s.log.Trace("Building another L2 block asap to catch up with wallclock",
"l2_unsafe", l2Head, "l2_unsafe_time", l2Head.Time, "wallclock", wallClock)
// But not too quickly to minimize busy-waiting for new blocks
time.AfterFunc(time.Millisecond*10, reqL2BlockCreation)
}
Expand Down