pub async fn pending_batch_exists(&mut self) -> DalResult<bool> {
        let count = sqlx::query_scalar!(
            "SELECT COUNT(miniblocks.number) FROM miniblocks WHERE l1_batch_number IS NULL"
        )
        .instrument("pending_batch_exists")
        .fetch_one(self.storage)
        .await?
        .unwrap_or(0);

        Ok(count != 0)
    }
Returns `true` if there exists a non-sealed batch (i.e. there is one+ stored L2 block that isn't assigned
to any batch yet).
core/lib/dal/src/blocks_dal.rs