Function cuprate_dandelion_tower::pool::start_dandelion_pool
source · pub fn start_dandelion_pool<P, R, Tx, TxID, PID>(
buffer_size: usize,
dandelion_router: R,
backing_pool: P,
config: DandelionConfig,
) -> DandelionPoolService<Tx, TxID, PID>where
Tx: Clone + Send + 'static,
TxID: Hash + Eq + Clone + Send + 'static,
PID: Hash + Eq + Clone + Send + 'static,
P: Service<TxStoreRequest<Tx, TxID>, Response = TxStoreResponse<Tx, TxID>, Error = BoxError> + Send + 'static,
P::Future: Send + 'static,
R: Service<DandelionRouteReq<Tx, PID>, Response = State, Error = DandelionRouterError> + Send + 'static,
R::Future: Send + 'static,Expand description
Start the DandelionPool.
This function spawns the DandelionPool and returns DandelionPoolService which can be used to send
requests to the pool.
§Args
buffer_sizeis the size of the channel’s buffer between theDandelionPoolServiceandDandelionPool.dandelion_routeris the router service, kept generic instead ofDandelionRouterto allow user to customise routing functionality.backing_poolis the backing transaction storage serviceconfigisDandelionConfig.