mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor: rename TransactionSignedEcRecovered to RecoveredTx (#13074)
This commit is contained in:
@ -237,7 +237,7 @@ mod tests {
|
||||
use alloy_primitives::{PrimitiveSignature as Signature, TxKind, U256};
|
||||
use op_alloy_consensus::TxDeposit;
|
||||
use reth_chainspec::MAINNET;
|
||||
use reth_primitives::{Transaction, TransactionSigned, TransactionSignedEcRecovered};
|
||||
use reth_primitives::{RecoveredTx, Transaction, TransactionSigned};
|
||||
use reth_provider::test_utils::MockEthProvider;
|
||||
use reth_transaction_pool::{
|
||||
blobstore::InMemoryBlobStore, validate::EthTransactionValidatorBuilder,
|
||||
@ -266,8 +266,7 @@ mod tests {
|
||||
});
|
||||
let signature = Signature::test_signature();
|
||||
let signed_tx = TransactionSigned::new_unhashed(deposit_tx, signature);
|
||||
let signed_recovered =
|
||||
TransactionSignedEcRecovered::from_signed_transaction(signed_tx, signer);
|
||||
let signed_recovered = RecoveredTx::from_signed_transaction(signed_tx, signer);
|
||||
let len = signed_recovered.encode_2718_len();
|
||||
let pooled_tx = EthPooledTransaction::new(signed_recovered, len);
|
||||
let outcome = validator.validate_one(origin, pooled_tx);
|
||||
|
||||
@ -27,7 +27,7 @@ use reth_optimism_node::{
|
||||
use reth_optimism_payload_builder::builder::OpPayloadTransactions;
|
||||
use reth_optimism_primitives::OpPrimitives;
|
||||
use reth_payload_util::{PayloadTransactions, PayloadTransactionsChain, PayloadTransactionsFixed};
|
||||
use reth_primitives::{SealedBlock, Transaction, TransactionSigned, TransactionSignedEcRecovered};
|
||||
use reth_primitives::{RecoveredTx, SealedBlock, Transaction, TransactionSigned};
|
||||
use reth_provider::providers::BlockchainProvider2;
|
||||
use reth_tasks::TaskManager;
|
||||
use reth_transaction_pool::pool::BestPayloadTransactions;
|
||||
@ -64,7 +64,7 @@ impl OpPayloadTransactions for CustomTxPriority {
|
||||
..Default::default()
|
||||
};
|
||||
let signature = sender.sign_transaction_sync(&mut end_of_block_tx).unwrap();
|
||||
let end_of_block_tx = TransactionSignedEcRecovered::from_signed_transaction(
|
||||
let end_of_block_tx = RecoveredTx::from_signed_transaction(
|
||||
TransactionSigned::new_unhashed(Transaction::Eip1559(end_of_block_tx), signature),
|
||||
sender.address(),
|
||||
);
|
||||
|
||||
@ -749,7 +749,7 @@ where
|
||||
))
|
||||
}
|
||||
|
||||
// Convert the transaction to a [TransactionSignedEcRecovered]. This is
|
||||
// Convert the transaction to a [RecoveredTx]. This is
|
||||
// purely for the purposes of utilizing the `evm_config.tx_env`` function.
|
||||
// Deposit transactions do not have signatures, so if the tx is a deposit, this
|
||||
// will just pull in its `from` address.
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum OpPayloadBuilderError {
|
||||
/// Thrown when a transaction fails to convert to a
|
||||
/// [`reth_primitives::TransactionSignedEcRecovered`].
|
||||
#[error("failed to convert deposit transaction to TransactionSignedEcRecovered")]
|
||||
/// [`reth_primitives::RecoveredTx`].
|
||||
#[error("failed to convert deposit transaction to RecoveredTx")]
|
||||
TransactionEcRecoverFailed,
|
||||
/// Thrown when the L1 block info could not be parsed from the calldata of the
|
||||
/// first transaction supplied in the payload attributes.
|
||||
|
||||
@ -6,7 +6,7 @@ use alloy_rpc_types_eth::TransactionInfo;
|
||||
use op_alloy_consensus::OpTxEnvelope;
|
||||
use op_alloy_rpc_types::Transaction;
|
||||
use reth_node_api::FullNodeComponents;
|
||||
use reth_primitives::{TransactionSigned, TransactionSignedEcRecovered};
|
||||
use reth_primitives::{RecoveredTx, TransactionSigned};
|
||||
use reth_provider::{BlockReaderIdExt, ReceiptProvider, TransactionsProvider};
|
||||
use reth_rpc_eth_api::{
|
||||
helpers::{EthSigner, EthTransactions, LoadTransaction, SpawnBlocking},
|
||||
@ -81,7 +81,7 @@ where
|
||||
|
||||
fn fill(
|
||||
&self,
|
||||
tx: TransactionSignedEcRecovered,
|
||||
tx: RecoveredTx,
|
||||
tx_info: TransactionInfo,
|
||||
) -> Result<Self::Transaction, Self::Error> {
|
||||
let from = tx.signer();
|
||||
|
||||
Reference in New Issue
Block a user