pub(crate) fn range(&self, batch_range: RangeInclusive<L1BatchNumber>) -> Vec<BatchDiff> {
        let from_l1_batch = *batch_range.start();
        let to_l1_batch = *batch_range.end();

        let first_diff_number = self.first_diff_l1_batch_number.expect("empty batch_diffs");
        assert!(from_l1_batch >= first_diff_number);
        assert!((to_l1_batch.0 as usize) < (first_diff_number.0 as usize) + self.diffs.len());

        let relative_start_index = (from_l1_batch.0 - first_diff_number.0) as usize;
        let relative_end_index = (to_l1_batch.0 - first_diff_number.0) as usize;

        self.diffs
            .range(relative_start_index..=relative_end_index)
            .cloned()
            .collect()
    }
Returns diffs for `from_l1_batch..=to_l1_batch`.

# Panics

Panics if there is no diff for some element in the range.
core/lib/state/src/storage_factory/rocksdb_with_memory.rs