Skip to content

Commit

Permalink
fixup! Merge branch 'tomas/fix-non-persisted-diffs' (#2964)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Apr 3, 2024
1 parent 2097ab4 commit 369d3db
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/apps/src/lib/node/ledger/storage/rocksdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
//! - `all`: the hashes included up to the last block
//! - `last`: the hashes included in the last block

use std::collections::HashSet;
use std::fs::File;
use std::io::{BufWriter, Write};
use std::path::Path;
Expand Down Expand Up @@ -585,8 +584,12 @@ impl RocksDB {

// Look for non-persisted diffs for rollback
let rollback_cf = self.get_column_family(ROLLBACK_CF)?;

// We don't need deterministic iter order
#[allow(clippy::disallowed_types)]
// Iterate the old keys first and keep a set of keys that have old val
let mut keys_with_old_value = HashSet::<String>::new();
let mut keys_with_old_value =
std::collections::HashSet::<String>::new();
for (key_str, val, _) in
iter_diffs_prefix(self, rollback_cf, last_block.height, None, true)
{
Expand Down

0 comments on commit 369d3db

Please sign in to comment.