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_size is the size of the channel’s buffer between the DandelionPoolService and DandelionPool.
  • dandelion_router is the router service, kept generic instead of DandelionRouter to allow user to customise routing functionality.
  • backing_pool is the backing transaction storage service
  • config is DandelionConfig.