feat: rename reth_primitives::RecoveredTx functions to match alloy::Recovered (#13663)

This commit is contained in:
Tuan Tran
2025-01-06 21:27:43 +07:00
committed by GitHub
parent d10af50e45
commit 20d3fa6bbb
27 changed files with 48 additions and 49 deletions

View File

@ -600,7 +600,7 @@ where
let local_transactions = local_transactions
.into_iter()
.map(|tx| tx.transaction.clone_into_consensus().into_signed())
.map(|tx| tx.transaction.clone_into_consensus().into_tx())
.collect::<Vec<_>>();
let num_txs = local_transactions.len();

View File

@ -357,7 +357,7 @@ where
};
size += encoded_len;
elements.push(pooled.into_signed());
elements.push(pooled.into_tx());
if limit.exceeds(size) {
break

View File

@ -685,7 +685,7 @@ impl PoolTransaction for MockTransaction {
fn try_consensus_into_pooled(
tx: RecoveredTx<Self::Consensus>,
) -> Result<RecoveredTx<Self::Pooled>, Self::TryFromConsensusError> {
let (tx, signer) = tx.to_components();
let (tx, signer) = tx.into_parts();
Self::Pooled::try_from(tx)
.map(|tx| tx.with_signer(signer))
.map_err(|_| TryFromRecoveredTransactionError::BlobSidecarMissing)
@ -871,7 +871,7 @@ impl EthPoolTransaction for MockTransaction {
self,
sidecar: Arc<BlobTransactionSidecar>,
) -> Option<RecoveredTx<Self::Pooled>> {
let (tx, signer) = self.into_consensus().to_components();
let (tx, signer) = self.into_consensus().into_parts();
tx.try_into_pooled_eip4844(Arc::unwrap_or_clone(sidecar))
.map(|tx| tx.with_signer(signer))
.ok()
@ -881,7 +881,7 @@ impl EthPoolTransaction for MockTransaction {
tx: RecoveredTx<Self::Consensus>,
sidecar: BlobTransactionSidecar,
) -> Option<Self> {
let (tx, signer) = tx.to_components();
let (tx, signer) = tx.into_parts();
tx.try_into_pooled_eip4844(sidecar)
.map(|tx| tx.with_signer(signer))
.ok()
@ -909,7 +909,7 @@ impl TryFrom<RecoveredTx<TransactionSigned>> for MockTransaction {
fn try_from(tx: RecoveredTx<TransactionSigned>) -> Result<Self, Self::Error> {
let sender = tx.signer();
let transaction = tx.into_signed();
let transaction = tx.into_tx();
let hash = transaction.hash();
let size = transaction.size();

View File

@ -1245,7 +1245,7 @@ impl<T: SignedTransaction> EthPooledTransaction<T> {
impl From<PooledTransactionsElementEcRecovered> for EthPooledTransaction {
fn from(tx: PooledTransactionsElementEcRecovered) -> Self {
let encoded_length = tx.encode_2718_len();
let (tx, signer) = tx.to_components();
let (tx, signer) = tx.into_parts();
match tx {
PooledTransaction::Eip4844(tx) => {
// include the blob sidecar
@ -1280,7 +1280,7 @@ impl PoolTransaction for EthPooledTransaction {
fn try_consensus_into_pooled(
tx: RecoveredTx<Self::Consensus>,
) -> Result<RecoveredTx<Self::Pooled>, Self::TryFromConsensusError> {
let (tx, signer) = tx.to_components();
let (tx, signer) = tx.into_parts();
let pooled = tx
.try_into_pooled()
.map_err(|_| TryFromRecoveredTransactionError::BlobSidecarMissing)?;
@ -1427,7 +1427,7 @@ impl EthPoolTransaction for EthPooledTransaction {
tx: RecoveredTx<Self::Consensus>,
sidecar: BlobTransactionSidecar,
) -> Option<Self> {
let (tx, signer) = tx.to_components();
let (tx, signer) = tx.into_parts();
tx.try_into_pooled_eip4844(sidecar)
.ok()
.map(|tx| tx.with_signer(signer))