pub fn service<S>(
service: S,
bound: usize,
) -> (Consensus<S>, Mempool<S>, Snapshot<S>, Info<S>)
Expand description
Splits a single service
implementing all of ABCI into four cloneable
component services, each implementing one category of ABCI requests. See the
module documentation for details.
The bound
parameter bounds the size of each component’s request queue. For
the same reason as in Tower’s Buffer
middleware,
it’s advisable to set the bound
to be at least the number of concurrent
requests to the component services. However, large buffers hide backpressure
from propagating to the caller.