Skip to content

Commit

Permalink
Update bridge-history-api/internal/orm/batch_event.go
Browse files Browse the repository at this point in the history
Co-authored-by: colin <[email protected]>
  • Loading branch information
amoylan2 and colinlyguo authored Jun 28, 2024
1 parent e932607 commit 78ed0ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bridge-history-api/internal/orm/batch_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (c *BatchEvent) InsertOrUpdateBatchEvents(ctx context.Context, l1BatchEvent
}
case btypes.BatchStatusTypeFinalized:
// After darwin, FinalizeBatch event signals a range of batches are finalized,
// thus losing the batch hash info. Meanwhile, only batch_index is enough to find the target batch.
// thus losing the batch hash info. Meanwhile, only batch_index is enough to find the target batch when finalizing batches.
db = db.Where("batch_index = ?", l1BatchEvent.BatchIndex)
updateFields["batch_status"] = btypes.BatchStatusTypeFinalized
if err := db.Updates(updateFields).Error; err != nil {
Expand Down

0 comments on commit 78ed0ef

Please sign in to comment.