Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
colinlyguo committed Nov 2, 2023
1 parent e0afb83 commit 460036c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rollup/internal/controller/relayer/l2_relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,13 @@ func (r *Layer2Relayer) ProcessCommittedBatches() {
switch status {
case types.ProvingTaskUnassigned, types.ProvingTaskAssigned:
now := time.Now()
elapsedTime := now.Sub(batch.CommittedAt)

if batch.CommittedAt == nil {
log.Error("batch.CommittedAt is nil", "index", batch.Index, "hash", batch.Hash)
return
}

elapsedTime := now.Sub(*batch.CommittedAt)
if r.cfg.EnableTestEnvBypassFeatures && elapsedTime.Seconds() > float64(r.cfg.FinalizeBatchWithoutProofTimeoutSec) {
if err := r.finalizeBatch(batch, false); err != nil {
log.Error("Failed to finalize timeout batch without proof", "index", batch.Index, "hash", batch.Hash, "err", err)
Expand Down

0 comments on commit 460036c

Please sign in to comment.