feat: add clone into consensus (#12999)

This commit is contained in:
Matthias Seitz
2024-11-29 11:53:05 +01:00
committed by GitHub
parent b6ba822cc3
commit a01e0319e4
7 changed files with 25 additions and 7 deletions

View File

@ -239,7 +239,7 @@ pub trait EthTransactions: LoadTransaction<Provider: BlockReaderIdExt> {
if let Some(tx) =
RpcNodeCore::pool(self).get_transaction_by_sender_and_nonce(sender, nonce)
{
let transaction = tx.transaction.clone().into_consensus();
let transaction = tx.transaction.clone_into_consensus();
return Ok(Some(from_recovered(transaction.into(), self.tx_resp_builder())?));
}
}

View File

@ -49,7 +49,7 @@ where
{
content.entry(tx.sender()).or_default().insert(
tx.nonce().to_string(),
from_recovered(tx.clone().into_consensus().into(), resp_builder)?,
from_recovered(tx.clone_into_consensus().into(), resp_builder)?,
);
Ok(())
@ -101,7 +101,7 @@ where
inspect: &mut BTreeMap<Address, BTreeMap<String, TxpoolInspectSummary>>,
) {
let entry = inspect.entry(tx.sender()).or_default();
let tx: TransactionSignedEcRecovered = tx.clone().into_consensus().into();
let tx: TransactionSignedEcRecovered = tx.clone_into_consensus().into();
entry.insert(
tx.nonce().to_string(),
TxpoolInspectSummary {