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

@@ -682,7 +682,7 @@ pub trait Call:
let env = EnvWithHandlerCfg::new_with_cfg_env(
cfg_env_with_handler_cfg,
block_env,
RpcNodeCore::evm_config(&this).tx_env(tx.as_signed(), tx.signer()),
RpcNodeCore::evm_config(&this).tx_env(tx.tx(), tx.signer()),
);
let (res, _) = this.transact(&mut db, env)?;

View File

@@ -341,7 +341,7 @@ pub trait LoadPendingBlock:
let env = Env::boxed(
cfg.cfg_env.clone(),
block_env.clone(),
Self::evm_config(self).tx_env(tx.as_signed(), tx.signer()),
Self::evm_config(self).tx_env(tx.tx(), tx.signer()),
);
let mut evm = revm::Evm::builder().with_env(env).with_db(&mut db).build();
@@ -393,7 +393,7 @@ pub trait LoadPendingBlock:
cumulative_gas_used += gas_used;
// append transaction to the list of executed transactions
let (tx, sender) = tx.to_components();
let (tx, sender) = tx.into_parts();
executed_txs.push(tx);
senders.push(sender);
results.push(result);

View File

@@ -226,7 +226,7 @@ pub trait Trace:
let env = EnvWithHandlerCfg::new_with_cfg_env(
cfg_env_with_handler_cfg,
block_env,
RpcNodeCore::evm_config(&this).tx_env(tx.as_signed(), tx.signer()),
RpcNodeCore::evm_config(&this).tx_env(tx.tx(), tx.signer()),
);
let (res, _) =
this.inspect(StateCacheDbRefMutWrapper(&mut db), env, &mut inspector)?;

View File

@@ -68,5 +68,5 @@ pub fn transaction_to_call_request<T: alloy_consensus::Transaction>(
tx: RecoveredTx<T>,
) -> TransactionRequest {
let from = tx.signer();
TransactionRequest::from_transaction_with_sender(tx.into_signed(), from)
TransactionRequest::from_transaction_with_sender(tx.into_tx(), from)
}

View File

@@ -273,7 +273,7 @@ where
env: Env::boxed(
cfg_env_with_handler_cfg.cfg_env.clone(),
block_env,
this.eth_api().evm_config().tx_env(tx.as_signed(), tx.signer()),
this.eth_api().evm_config().tx_env(tx.tx(), tx.signer()),
),
handler_cfg: cfg_env_with_handler_cfg.handler_cfg,
};

View File

@@ -44,7 +44,7 @@ where
) -> Result<Self::Transaction, Self::Error> {
let from = tx.signer();
let hash = tx.hash();
let TransactionSigned { transaction, signature, .. } = tx.into_signed();
let TransactionSigned { transaction, signature, .. } = tx.into_tx();
let inner: TxEnvelope = match transaction {
reth_primitives::Transaction::Legacy(tx) => {

View File

@@ -172,7 +172,7 @@ where
match &body[idx] {
BundleItem::Tx { tx, can_revert } => {
let recovered_tx = recover_raw_transaction::<PoolPooledTx<Eth::Pool>>(tx)?;
let (tx, signer) = recovered_tx.to_components();
let (tx, signer) = recovered_tx.into_parts();
let tx: PoolConsensusTx<Eth::Pool> =
<Eth::Pool as TransactionPool>::Transaction::pooled_into_consensus(tx);

View File

@@ -121,7 +121,7 @@ where
let env = EnvWithHandlerCfg::new_with_cfg_env(
cfg_env_with_handler_cfg,
block_env,
self.eth_api().evm_config().tx_env(tx.as_signed(), tx.signer()),
self.eth_api().evm_config().tx_env(tx.tx(), tx.signer()),
);
let config = TracingInspectorConfig::from_parity_config(&trace_types);

View File

@@ -103,7 +103,7 @@ where
) {
let entry = inspect.entry(tx.sender()).or_default();
let tx = tx.clone_into_consensus();
entry.insert(tx.nonce().to_string(), tx.into_signed().into());
entry.insert(tx.nonce().to_string(), tx.into_tx().into());
}
let AllPoolTransactions { pending, queued } = self.pool.all_transactions();