chore: rm standalone fn (#17007)

This commit is contained in:
Matthias Seitz
2025-06-23 16:22:01 +02:00
committed by GitHub
parent ff5787da81
commit dc67f0237f

View File

@@ -59,7 +59,6 @@ use std::{
collections::HashMap,
fmt::Debug,
net::{Ipv4Addr, SocketAddr, SocketAddrV4},
sync::Arc,
time::{Duration, SystemTime, UNIX_EPOCH},
};
use tower::Layer;
@@ -101,40 +100,6 @@ use reth_rpc::eth::sim_bundle::EthSimBundle;
// Rpc rate limiter
pub mod rate_limiter;
/// Convenience function for starting a server in one step.
#[expect(clippy::too_many_arguments)]
pub async fn launch<N, Provider, Pool, Network, EvmConfig, EthApi>(
provider: Provider,
pool: Pool,
network: Network,
module_config: impl Into<TransportRpcModuleConfig>,
server_config: impl Into<RpcServerConfig>,
executor: Box<dyn TaskSpawner + 'static>,
evm_config: EvmConfig,
eth: EthApi,
consensus: Arc<dyn FullConsensus<N, Error = ConsensusError>>,
) -> Result<RpcServerHandle, RpcError>
where
N: NodePrimitives,
Provider: FullRpcProvider<Block = N::Block, Receipt = N::Receipt, Header = N::BlockHeader>
+ CanonStateSubscriptions<Primitives = N>
+ AccountReader
+ ChangeSetReader,
Pool: TransactionPool + 'static,
Network: NetworkInfo + Peers + Clone + 'static,
EvmConfig: ConfigureEvm<Primitives = N> + 'static,
EthApi: FullEthApiServer<Provider = Provider, Pool = Pool>,
{
let module_config = module_config.into();
server_config
.into()
.start(
&RpcModuleBuilder::new(provider, pool, network, executor, evm_config, consensus)
.build(module_config, eth),
)
.await
}
/// A builder type to configure the RPC module: See [`RpcModule`]
///
/// This is the main entrypoint and the easiest way to configure an RPC server.