Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tnv1 committed Dec 30, 2024
1 parent 9862dc3 commit cdb7050
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions crates/stages/stages/src/stages/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,11 @@ mod tests {
// writer for the first time.
let mut static_file_provider = db.factory.static_file_provider();
static_file_provider = StaticFileProvider::read_write(static_file_provider.path()).unwrap();
assert_eq!(
assert!(matches!(
static_file_provider
.check_consistency(&db.factory.database_provider_ro().unwrap(), is_full_node,),
Ok(expected)
);
));
}

/// Saves a checkpoint with `checkpoint_block_number` and compare the check consistency result
Expand All @@ -338,12 +338,12 @@ mod tests {
.unwrap();
provider_rw.commit().unwrap();

assert_eq!(
assert!(matches!(
db.factory
.static_file_provider()
.check_consistency(&db.factory.database_provider_ro().unwrap(), false,),
Ok(expected)
);
));
}

/// Inserts a dummy value at key and compare the check consistency result against the expected
Expand Down
9 changes: 6 additions & 3 deletions crates/storage/provider/src/providers/state/historical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -809,11 +809,14 @@ mod tests {
storage_history_block_number: Some(2),
},
);
assert_eq!(provider.account_history_lookup(ADDRESS), Ok(HistoryInfo::MaybeInPlainState));
assert_eq!(
assert!(matches!(
provider.account_history_lookup(ADDRESS),
Ok(HistoryInfo::MaybeInPlainState)
));
assert!(matches!(
provider.storage_history_lookup(ADDRESS, STORAGE),
Ok(HistoryInfo::MaybeInPlainState)
);
));

// provider block_number == lowest available block number,
// i.e. state at provider block is available
Expand Down

0 comments on commit cdb7050

Please sign in to comment.