Skip to content

Commit

Permalink
feat: update Transaction::purge_block to include l1_handler txs a…
Browse files Browse the repository at this point in the history
…nd `L1ToL2MessageLog`s
  • Loading branch information
t00ts committed Sep 23, 2024
1 parent d8b2c7a commit 6ff249d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions crates/storage/src/connection/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,20 @@ impl Transaction<'_> {
)
.context("Deleting block from trie_class_removals table")?;

self.inner()
.execute(
"DELETE FROM l1_to_l2_messages WHERE l1_block_number = ?",
params![&block],
)
.context("Deleting block from l1_to_l2_messages table")?;

self.inner()
.execute(
"DELETE FROM l1_handler_txs WHERE l1_block_number = ?",
params![&block],
)
.context("Deleting block from l1_handler_txs table")?;

Ok(())
}

Expand Down

0 comments on commit 6ff249d

Please sign in to comment.