mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
remove IntoRecoveredTransaction (#11221)
This commit is contained in:
@ -5,7 +5,6 @@ use reth_beacon_consensus::{BeaconEngineMessage, ForkchoiceStatus};
|
||||
use reth_chainspec::{EthChainSpec, EthereumHardforks};
|
||||
use reth_engine_primitives::EngineTypes;
|
||||
use reth_evm::execute::BlockExecutorProvider;
|
||||
use reth_primitives::IntoRecoveredTransaction;
|
||||
use reth_provider::{CanonChainTracker, StateProviderFactory};
|
||||
use reth_stages_api::PipelineEvent;
|
||||
use reth_tokio_util::EventStream;
|
||||
|
||||
@ -33,8 +33,7 @@ use reth_primitives::{
|
||||
constants::{eip4844::MAX_DATA_GAS_PER_BLOCK, BEACON_NONCE},
|
||||
proofs::{self, calculate_requests_root},
|
||||
revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg},
|
||||
Block, BlockBody, EthereumHardforks, Header, IntoRecoveredTransaction, Receipt,
|
||||
EMPTY_OMMER_ROOT_HASH,
|
||||
Block, BlockBody, EthereumHardforks, Header, Receipt, EMPTY_OMMER_ROOT_HASH,
|
||||
};
|
||||
use reth_provider::{ChainSpecProvider, StateProviderFactory};
|
||||
use reth_revm::database::StateProviderDatabase;
|
||||
|
||||
@ -17,7 +17,7 @@ use reth_primitives::{
|
||||
constants::BEACON_NONCE,
|
||||
proofs,
|
||||
revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg},
|
||||
Block, BlockBody, Header, IntoRecoveredTransaction, Receipt, TxType, EMPTY_OMMER_ROOT_HASH,
|
||||
Block, BlockBody, Header, Receipt, TxType, EMPTY_OMMER_ROOT_HASH,
|
||||
};
|
||||
use reth_provider::StateProviderFactory;
|
||||
use reth_revm::database::StateProviderDatabase;
|
||||
|
||||
@ -62,9 +62,9 @@ pub use transaction::BlobTransactionValidationError;
|
||||
|
||||
pub use transaction::{
|
||||
util::secp256k1::{public_key_to_address, recover_signer_unchecked, sign_message},
|
||||
IntoRecoveredTransaction, InvalidTransactionError, Signature, Transaction, TransactionMeta,
|
||||
TransactionSigned, TransactionSignedEcRecovered, TransactionSignedNoHash, TxHashOrNumber,
|
||||
TxType, EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, EIP4844_TX_TYPE_ID, EIP7702_TX_TYPE_ID,
|
||||
InvalidTransactionError, Signature, Transaction, TransactionMeta, TransactionSigned,
|
||||
TransactionSignedEcRecovered, TransactionSignedNoHash, TxHashOrNumber, TxType,
|
||||
EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, EIP4844_TX_TYPE_ID, EIP7702_TX_TYPE_ID,
|
||||
LEGACY_TX_TYPE_ID,
|
||||
};
|
||||
|
||||
|
||||
@ -1634,15 +1634,6 @@ impl Decodable for TransactionSignedEcRecovered {
|
||||
}
|
||||
}
|
||||
|
||||
/// Ensures the transaction can be sent over the
|
||||
/// network
|
||||
pub trait IntoRecoveredTransaction {
|
||||
/// Converts to this type into a [`TransactionSignedEcRecovered`].
|
||||
///
|
||||
/// Note: this takes `&self` since indented usage is via `Arc<Self>`.
|
||||
fn to_recovered_transaction(&self) -> TransactionSignedEcRecovered;
|
||||
}
|
||||
|
||||
/// Generic wrapper with encoded Bytes, such as transaction data.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct WithEncoded<T>(Bytes, pub T);
|
||||
|
||||
@ -20,8 +20,8 @@ use reth_primitives::{
|
||||
BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, EVMError, Env, ExecutionResult, InvalidTransaction,
|
||||
ResultAndState, SpecId,
|
||||
},
|
||||
Block, BlockBody, Header, IntoRecoveredTransaction, Receipt, Requests, SealedBlockWithSenders,
|
||||
SealedHeader, TransactionSignedEcRecovered, EMPTY_OMMER_ROOT_HASH,
|
||||
Block, BlockBody, Header, Receipt, Requests, SealedBlockWithSenders, SealedHeader,
|
||||
TransactionSignedEcRecovered, EMPTY_OMMER_ROOT_HASH,
|
||||
};
|
||||
use reth_provider::{
|
||||
BlockReader, BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, ProviderError,
|
||||
|
||||
@ -19,7 +19,7 @@ use async_trait::async_trait;
|
||||
use jsonrpsee::{core::RpcResult, server::IdProvider};
|
||||
use reth_chainspec::ChainInfo;
|
||||
use reth_node_api::EthApiTypes;
|
||||
use reth_primitives::{IntoRecoveredTransaction, TransactionSignedEcRecovered};
|
||||
use reth_primitives::TransactionSignedEcRecovered;
|
||||
use reth_provider::{BlockIdReader, BlockReader, EvmEnvProvider, ProviderError};
|
||||
use reth_rpc_eth_api::{EthFilterApiServer, FullEthApiTypes, RpcTransaction, TransactionCompat};
|
||||
use reth_rpc_eth_types::{
|
||||
|
||||
@ -16,7 +16,6 @@ use jsonrpsee::{
|
||||
server::SubscriptionMessage, types::ErrorObject, PendingSubscriptionSink, SubscriptionSink,
|
||||
};
|
||||
use reth_network_api::NetworkInfo;
|
||||
use reth_primitives::IntoRecoveredTransaction;
|
||||
use reth_provider::{BlockReader, CanonStateSubscriptions, EvmEnvProvider};
|
||||
use reth_rpc_eth_api::{pubsub::EthPubSubApiServer, FullEthApiTypes, RpcTransaction};
|
||||
use reth_rpc_eth_types::logs_utils;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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},
|
||||
|
||||
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ use reth::{
|
||||
args::utils::DefaultChainSpecParser,
|
||||
builder::NodeHandle,
|
||||
cli::Cli,
|
||||
primitives::{Address, BlockNumberOrTag, IntoRecoveredTransaction},
|
||||
primitives::{Address, BlockNumberOrTag},
|
||||
revm::{
|
||||
inspector_handle_register,
|
||||
interpreter::{Interpreter, OpCode},
|
||||
|
||||
@ -14,12 +14,8 @@ use alloy_rpc_types_trace::{parity::TraceType, tracerequest::TraceCallRequest};
|
||||
use clap::Parser;
|
||||
use futures_util::StreamExt;
|
||||
use reth::{
|
||||
args::utils::DefaultChainSpecParser,
|
||||
builder::NodeHandle,
|
||||
cli::Cli,
|
||||
primitives::{Address, IntoRecoveredTransaction},
|
||||
rpc::compat::transaction::transaction_to_call_request,
|
||||
transaction_pool::TransactionPool,
|
||||
args::utils::DefaultChainSpecParser, builder::NodeHandle, cli::Cli, primitives::Address,
|
||||
rpc::compat::transaction::transaction_to_call_request, transaction_pool::TransactionPool,
|
||||
};
|
||||
use reth_node_ethereum::node::EthereumNode;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user