Skip to content

Commit db8932c

Browse files
committed
fix: L1 message L1MessageKey::BlockNumber lookup edge case
1 parent 82dbc02 commit db8932c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/database/db/src/operations.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,11 +855,13 @@ impl<T: ReadConnectionProvider + Sync + ?Sized> DatabaseReadOperations for T {
855855
.await?
856856
{
857857
// Yield n messages starting from the found queue index + 1.
858+
// Only return messages that haven't been skipped (skipped = false).
858859
Ok(models::l1_message::Entity::find()
859860
.filter(
860861
// We add 1 to the queue index to constrain across block boundaries
861862
models::l1_message::Column::QueueIndex.gte(record.queue_index + 1),
862863
)
864+
.filter(models::l1_message::Column::Skipped.eq(false))
863865
.order_by_asc(models::l1_message::Column::QueueIndex)
864866
.limit(Some(n as u64))
865867
.all(self.get_connection())

0 commit comments

Comments
 (0)