mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: rename reth_primitives::RecoveredTx functions to match alloy::Recovered (#13663)
This commit is contained in:
@ -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();
|
||||
|
||||
@ -357,7 +357,7 @@ where
|
||||
};
|
||||
|
||||
size += encoded_len;
|
||||
elements.push(pooled.into_signed());
|
||||
elements.push(pooled.into_tx());
|
||||
|
||||
if limit.exceeds(size) {
|
||||
break
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
@ -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))
|
||||
|
||||
Reference in New Issue
Block a user