diff --git a/crates/stages/stages/src/stages/mod.rs b/crates/stages/stages/src/stages/mod.rs index 1e26f3d54e499..fc7936ae807e6 100644 --- a/crates/stages/stages/src/stages/mod.rs +++ b/crates/stages/stages/src/stages/mod.rs @@ -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 @@ -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 diff --git a/crates/storage/provider/src/providers/state/historical.rs b/crates/storage/provider/src/providers/state/historical.rs index be211081efefb..c1e3a20cd3e7d 100644 --- a/crates/storage/provider/src/providers/state/historical.rs +++ b/crates/storage/provider/src/providers/state/historical.rs @@ -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