remove IntoRecoveredTransaction (#11221)

This commit is contained in:
nk_ysg
2024-09-26 01:10:11 +08:00
committed by GitHub
parent 4ef9635fa9
commit 76a6e0db69
13 changed files with 21 additions and 37 deletions

View File

@ -17,8 +17,8 @@ use reth_chainspec::{ChainSpec, ChainSpecProvider};
use reth_execution_types::ChangedAccount;
use reth_fs_util::FsPathError;
use reth_primitives::{
alloy_primitives::Sealable, BlockNumberOrTag, IntoRecoveredTransaction,
PooledTransactionsElementEcRecovered, SealedHeader, TransactionSigned,
alloy_primitives::Sealable, BlockNumberOrTag, PooledTransactionsElementEcRecovered,
SealedHeader, TransactionSigned,
};
use reth_storage_api::{errors::provider::ProviderError, BlockReaderIdExt, StateProviderFactory};
use reth_tasks::TaskSpawner;

View File

@ -87,8 +87,7 @@ use reth_eth_wire_types::HandleMempoolData;
use reth_execution_types::ChangedAccount;
use reth_primitives::{
BlobTransaction, BlobTransactionSidecar, IntoRecoveredTransaction, PooledTransactionsElement,
TransactionSigned,
BlobTransaction, BlobTransactionSidecar, PooledTransactionsElement, TransactionSigned,
};
use std::{
collections::{HashMap, HashSet},

View File

@ -8,8 +8,8 @@ use crate::{
use alloy_primitives::{Address, TxHash, B256, U256};
use futures_util::future::Either;
use reth_primitives::{
BlobTransactionSidecar, IntoRecoveredTransaction, PooledTransactionsElementEcRecovered,
SealedBlock, TransactionSignedEcRecovered,
BlobTransactionSidecar, PooledTransactionsElementEcRecovered, SealedBlock,
TransactionSignedEcRecovered,
};
use std::{fmt, future::Future, time::Instant};
@ -380,10 +380,11 @@ impl<T: PoolTransaction> ValidPoolTransaction<T> {
}
}
impl<T: PoolTransaction<Consensus = TransactionSignedEcRecovered>> IntoRecoveredTransaction
for ValidPoolTransaction<T>
{
fn to_recovered_transaction(&self) -> TransactionSignedEcRecovered {
impl<T: PoolTransaction<Consensus = TransactionSignedEcRecovered>> ValidPoolTransaction<T> {
/// Converts to this type into a [`TransactionSignedEcRecovered`].
///
/// Note: this takes `&self` since indented usage is via `Arc<Self>`.
pub fn to_recovered_transaction(&self) -> TransactionSignedEcRecovered {
self.transaction.clone().into_consensus()
}
}