feat: use reth-ethereum-primitives (#13830)

This commit is contained in:
Arsenii Kulikov
2025-01-17 04:22:21 +04:00
committed by GitHub
parent 7e972ea23d
commit 8efe441cc0
67 changed files with 941 additions and 3025 deletions

View File

@ -220,6 +220,7 @@ mod tests {
models::StoredBlockBodyIndices,
};
use reth_primitives::SealedBlock;
use reth_primitives_traits::SignedTransaction;
use reth_provider::providers::StaticFileWriter;
use reth_testing_utils::generators::{
self, random_block_range, random_contract_account_range, BlockRangeParams,
@ -356,7 +357,7 @@ mod tests {
progress.body().transactions.iter().try_for_each(
|transaction| -> Result<(), reth_db::DatabaseError> {
tx.put::<tables::TransactionHashNumbers>(
transaction.hash(),
*transaction.tx_hash(),
next_tx_num,
)?;
tx.put::<tables::Transactions>(next_tx_num, transaction.clone())?;

View File

@ -387,7 +387,7 @@ mod tests {
for block in &blocks[..=max_processed_block] {
for transaction in &block.body().transactions {
if block.number > max_pruned_block {
tx_hash_numbers.push((transaction.hash(), tx_hash_number));
tx_hash_numbers.push((*transaction.tx_hash(), tx_hash_number));
}
tx_hash_number += 1;
}
@ -552,7 +552,10 @@ mod tests {
for tx_id in body.tx_num_range() {
let transaction =
provider.transaction_by_id(tx_id)?.expect("no transaction entry");
assert_eq!(Some(tx_id), provider.transaction_id(transaction.hash())?);
assert_eq!(
Some(tx_id),
provider.transaction_id(*transaction.tx_hash())?
);
}
}
}