mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: move proof types and root functions from primitives/proofs into reth-trie-common (#8724)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -3,7 +3,7 @@ use alloy_rlp::{BufMut, Encodable};
|
||||
use itertools::Itertools;
|
||||
use reth_db_api::database::Database;
|
||||
use reth_execution_errors::StorageRootError;
|
||||
use reth_primitives::{proofs::IntoTrieAccount, B256};
|
||||
use reth_primitives::B256;
|
||||
use reth_provider::{providers::ConsistentDbView, DatabaseProviderFactory, ProviderError};
|
||||
use reth_tasks::pool::BlockingTaskPool;
|
||||
use reth_trie::{
|
||||
@ -12,7 +12,7 @@ use reth_trie::{
|
||||
trie_cursor::TrieCursorFactory,
|
||||
updates::TrieUpdates,
|
||||
walker::TrieWalker,
|
||||
HashBuilder, HashedPostState, Nibbles, StorageRoot,
|
||||
HashBuilder, HashedPostState, Nibbles, StorageRoot, TrieAccount,
|
||||
};
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
use thiserror::Error;
|
||||
@ -170,7 +170,7 @@ where
|
||||
}
|
||||
|
||||
account_rlp.clear();
|
||||
let account = IntoTrieAccount::to_trie_account((account, storage_root));
|
||||
let account = TrieAccount::from((account, storage_root));
|
||||
account.encode(&mut account_rlp as &mut dyn BufMut);
|
||||
hash_builder.add_leaf(Nibbles::unpack(hashed_address), &account_rlp);
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ use alloy_rlp::{BufMut, Encodable};
|
||||
use rayon::prelude::*;
|
||||
use reth_db_api::database::Database;
|
||||
use reth_execution_errors::StorageRootError;
|
||||
use reth_primitives::{proofs::IntoTrieAccount, B256};
|
||||
use reth_primitives::B256;
|
||||
use reth_provider::{providers::ConsistentDbView, DatabaseProviderFactory, ProviderError};
|
||||
use reth_trie::{
|
||||
hashed_cursor::{HashedCursorFactory, HashedPostStateCursorFactory},
|
||||
@ -11,7 +11,7 @@ use reth_trie::{
|
||||
trie_cursor::TrieCursorFactory,
|
||||
updates::TrieUpdates,
|
||||
walker::TrieWalker,
|
||||
HashBuilder, HashedPostState, Nibbles, StorageRoot,
|
||||
HashBuilder, HashedPostState, Nibbles, StorageRoot, TrieAccount,
|
||||
};
|
||||
use std::collections::HashMap;
|
||||
use thiserror::Error;
|
||||
@ -152,7 +152,7 @@ where
|
||||
}
|
||||
|
||||
account_rlp.clear();
|
||||
let account = IntoTrieAccount::to_trie_account((account, storage_root));
|
||||
let account = TrieAccount::from((account, storage_root));
|
||||
account.encode(&mut account_rlp as &mut dyn BufMut);
|
||||
hash_builder.add_leaf(Nibbles::unpack(hashed_address), &account_rlp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user