pub fn roll_back_logs(&mut self, last_l1_batch_to_keep: L1BatchNumber) -> anyhow::Result<()> {
        self.tree.db.reset();
        let retained_version_count = u64::from(last_l1_batch_to_keep.0 + 1);
        // Since `Patched<_>` doesn't implement `PruneDatabase`, we borrow the underlying DB, which is safe
        // because the in-memory patch was reset above.
        MerkleTree::new_unchecked(self.tree.db.inner_mut())
            .truncate_recent_versions(retained_version_count)
    }
Rolls back this tree to a previous state. This method will overwrite all unsaved changes in the tree.

# Errors

Proxies database I/O errors.
core/lib/merkle_tree/src/domain.rs