diff --git a/core/lib/dal/.sqlx/query-3f9543c622a3877dd8612f3fc5f31867b3c0bff34bbacbc31ff4cd786c97ca90.json b/core/lib/dal/.sqlx/query-3f9543c622a3877dd8612f3fc5f31867b3c0bff34bbacbc31ff4cd786c97ca90.json new file mode 100644 index 000000000000..72d008c11475 --- /dev/null +++ b/core/lib/dal/.sqlx/query-3f9543c622a3877dd8612f3fc5f31867b3c0bff34bbacbc31ff4cd786c97ca90.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM l1_batches_consensus\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "3f9543c622a3877dd8612f3fc5f31867b3c0bff34bbacbc31ff4cd786c97ca90" +} diff --git a/core/lib/dal/src/consensus_dal.rs b/core/lib/dal/src/consensus_dal.rs index 87285266d58e..4887398d2a2b 100644 --- a/core/lib/dal/src/consensus_dal.rs +++ b/core/lib/dal/src/consensus_dal.rs @@ -92,6 +92,14 @@ impl ConsensusDal<'_, '_> { serde_json::value::Serializer, ) .unwrap(); + sqlx::query!( + r#" + DELETE FROM l1_batches_consensus + "# + ) + .instrument("try_update_genesis#DELETE FROM l1_batches_consensus") + .execute(&mut txn) + .await?; sqlx::query!( r#" DELETE FROM miniblocks_consensus