pub async fn delete_unsealed_l1_batch(
        &mut self,
        batch_to_keep: L1BatchNumber,
    ) -> DalResult<()> {
        let deleted_row = sqlx::query!(
            r#"
            DELETE FROM l1_batches
            WHERE
                number > $1
                AND NOT is_sealed
            RETURNING number
            "#,
            i64::from(batch_to_keep.0)
        )
        .instrument("delete_unsealed_l1_batch")
        .with_arg("batch_to_keep", &batch_to_keep)
        .fetch_optional(self.storage)
        .await?;
        if let Some(deleted_row) = deleted_row {
            tracing::info!(
                l1_batch_number = %deleted_row.number,
                "Deleted unsealed batch"
            );
        }
        Ok(())
    }
Deletes the unsealed L1 batch from the storage. Expects the caller to make sure there are no
associated L2 blocks.

Accepts `batch_to_keep` as a safety mechanism.
core/lib/dal/src/blocks_dal.rs