chore: replace TrieAccount with alloy's (#13397)

This commit is contained in:
Matthias Seitz
2024-12-16 03:57:02 +01:00
committed by GitHub
parent 4e6ed39b6d
commit 091c5499ba
17 changed files with 93 additions and 173 deletions

View File

@ -20,6 +20,7 @@ use reth_primitives::{
BlockBody, EthPrimitives, NodePrimitives, Receipt, Receipts, RecoveredTx, SealedBlock,
SealedBlockWithSenders, SealedHeader, Transaction, TransactionSigned,
};
use reth_primitives_traits::Account;
use reth_storage_api::NodePrimitivesProvider;
use reth_trie::{root::state_root_unhashed, updates::TrieUpdates, HashedPostState};
use revm::{db::BundleState, primitives::AccountInfo};
@ -150,14 +151,12 @@ impl TestBlockBuilder {
beneficiary: Address::random(),
state_root: state_root_unhashed(HashMap::from([(
self.signer,
(
AccountInfo {
balance: initial_signer_balance - signer_balance_decrease,
nonce: num_txs,
..Default::default()
},
EMPTY_ROOT_HASH,
),
Account {
balance: initial_signer_balance - signer_balance_decrease,
nonce: num_txs,
..Default::default()
}
.into_trie_account(EMPTY_ROOT_HASH),
)])),
// use the number as the timestamp so it is monotonically increasing
timestamp: number +