Skip to content

Commit

Permalink
more fixes in init tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Jan 25, 2024
1 parent 278c083 commit a54b538
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/reth/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,14 @@ mod tests {
..Default::default()
});

let factory = create_test_provider_factory_with_chain_spec(chain_spec);
let factory = create_test_provider_factory_with_chain_spec(chain_spec.clone());
init_genesis(factory.clone(), chain_spec).unwrap();

let tx = factory.provider().expect("failed to init provider").tx_ref();
let provider = factory.provider().expect("failed to init provider");
let tx = provider.tx_ref();

assert_eq!(
collect_table_entries::<Arc<DatabaseEnv>, tables::AccountHistory>(&tx)
collect_table_entries::<Arc<DatabaseEnv>, tables::AccountHistory>(tx)
.expect("failed to collect"),
vec![
(ShardedKey::new(address_with_balance, u64::MAX), IntegerList::new([0]).unwrap()),
Expand All @@ -332,7 +333,7 @@ mod tests {
);

assert_eq!(
collect_table_entries::<Arc<DatabaseEnv>, tables::StorageHistory>(&tx)
collect_table_entries::<Arc<DatabaseEnv>, tables::StorageHistory>(tx)
.expect("failed to collect"),
vec![(
StorageShardedKey::new(address_with_storage, storage_key, u64::MAX),
Expand Down

0 comments on commit a54b538

Please sign in to comment.