mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: use reth-ethereum-primitives (#13830)
This commit is contained in:
@ -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())?;
|
||||
|
||||
@ -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())?
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user