Skip to content

Commit 20ccb12

Browse files
author
colinlyguo
committed
address comments
1 parent 819f4ce commit 20ccb12

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rollup/internal/controller/relayer/l2_relayer_sanity.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ func (r *Layer2Relayer) getBatchesFromCalldata(info *CalldataInfo) ([]*dbBatchWi
134134
for _, tx := range block.Transactions {
135135
if tx.Type == types.L1MessageTxType {
136136
l1MessagesWithBlockNumbers[block.Header.Number.Uint64()] = append(l1MessagesWithBlockNumbers[block.Header.Number.Uint64()], tx)
137+
} else {
138+
// If it's not an L1 message, we can skip it, which verifies that all L1 messages are put in front of L2 transactions
139+
break
137140
}
138141
}
139142
}

0 commit comments

Comments
 (0)