feat(trie): write sorted hashed state (#9519)

This commit is contained in:
Roman Krasiuk
2024-07-15 08:15:58 -07:00
committed by GitHub
parent 80b02fec0f
commit 63e5dac0b6
11 changed files with 46 additions and 38 deletions

View File

@ -27,7 +27,7 @@ pub fn calculate_state_root(c: &mut Criterion) {
let provider_factory = create_test_provider_factory();
{
let provider_rw = provider_factory.provider_rw().unwrap();
HashedStateChanges(db_state).write_to_db(&provider_rw).unwrap();
HashedStateChanges(&db_state.into_sorted()).write_to_db(&provider_rw).unwrap();
let (_, updates) =
StateRoot::from_tx(provider_rw.tx_ref()).root_with_updates().unwrap();
updates.write_to_database(provider_rw.tx_ref()).unwrap();