refactor: rename TransactionSignedEcRecovered to RecoveredTx (#13074)

This commit is contained in:
Arsenii Kulikov
2024-12-03 03:36:09 +04:00
committed by GitHub
parent 9831953781
commit 9ed9fa241d
28 changed files with 170 additions and 223 deletions

View File

@ -8,8 +8,8 @@ use alloy_primitives::{Address, BlockHash, BlockNumber, TxHash};
use core::{fmt, ops::RangeInclusive};
use reth_execution_errors::{BlockExecutionError, InternalBlockExecutionError};
use reth_primitives::{
transaction::SignedTransactionIntoRecoveredExt, SealedBlockFor, SealedBlockWithSenders,
SealedHeader, TransactionSignedEcRecovered,
transaction::SignedTransactionIntoRecoveredExt, RecoveredTx, SealedBlockFor,
SealedBlockWithSenders, SealedHeader,
};
use reth_primitives_traits::{Block, BlockBody, NodePrimitives, SignedTransaction};
use reth_trie::updates::TrieUpdates;
@ -436,14 +436,13 @@ impl<B: Block<Body: BlockBody<Transaction: SignedTransaction>>> ChainBlocks<'_,
self.blocks.values().flat_map(|block| block.transactions_with_sender())
}
/// Returns an iterator over all [`TransactionSignedEcRecovered`] in the blocks
/// Returns an iterator over all [`RecoveredTx`] in the blocks
///
/// Note: This clones the transactions since it is assumed this is part of a shared [Chain].
#[inline]
pub fn transactions_ecrecovered(
&self,
) -> impl Iterator<Item = TransactionSignedEcRecovered<<B::Body as BlockBody>::Transaction>> + '_
{
) -> impl Iterator<Item = RecoveredTx<<B::Body as BlockBody>::Transaction>> + '_ {
self.transactions_with_sender().map(|(signer, tx)| tx.clone().with_signer(*signer))
}