diff --git a/crates/rpc/src/signet/endpoints.rs b/crates/rpc/src/signet/endpoints.rs index b0921a5..4abda48 100644 --- a/crates/rpc/src/signet/endpoints.rs +++ b/crates/rpc/src/signet/endpoints.rs @@ -5,36 +5,12 @@ use crate::{ }; use ajj::{HandlerCtx, ResponsePayload}; use reth_node_api::FullNodeComponents; -use signet_bundle::{ - SignetBundleDriver, SignetCallBundle, SignetCallBundleResponse, SignetEthBundle, -}; +use signet_bundle::{SignetBundleDriver, SignetCallBundle, SignetCallBundleResponse}; use signet_node_types::Pnt; use signet_types::SignedOrder; use std::time::Duration; use tokio::select; -pub(super) async fn send_bundle( - hctx: HandlerCtx, - bundle: SignetEthBundle, - ctx: RpcCtx, -) -> Result<(), String> -where - Host: FullNodeComponents, - Signet: Pnt, -{ - let task = |hctx: HandlerCtx| async move { - let Some(tx_cache) = ctx.signet().tx_cache() else { - return Err(SignetError::TxCacheUrlNotProvided.into_string()); - }; - - hctx.spawn(async move { tx_cache.forward_bundle(bundle).await.map_err(|e| e.to_string()) }); - - Ok(()) - }; - - await_handler!(@option hctx.spawn_blocking_with_ctx(task)) -} - pub(super) async fn send_order( hctx: HandlerCtx, order: SignedOrder, diff --git a/crates/rpc/src/signet/mod.rs b/crates/rpc/src/signet/mod.rs index 015139b..c882000 100644 --- a/crates/rpc/src/signet/mod.rs +++ b/crates/rpc/src/signet/mod.rs @@ -15,8 +15,5 @@ where Host: FullNodeComponents, Signet: Pnt, { - ajj::Router::new() - .route("sendBundle", send_bundle) - .route("sendOrder", send_order) - .route("callBundle", call_bundle) + ajj::Router::new().route("sendOrder", send_order).route("callBundle", call_bundle) }