consensus, state: increase Buffer sizes

Using a Buffer with size 1 is a footgun because it allows only one
sender to call poll_ready at a time.  This is usually undesirable
because it means that a task or service that calls poll_ready but only
makes a service call later (potentially much later) will block all other
callers.
This commit is contained in:
Henry de Valence 2020-09-19 23:58:41 -07:00
parent 6f3288814c
commit 9e2ff23d54
2 changed files with 2 additions and 2 deletions

View File

@ -152,6 +152,6 @@ where
max_checkpoint_height,
last_block_height: None,
}),
1,
3,
)
}

View File

@ -104,5 +104,5 @@ pub fn init(
config: Config,
network: Network,
) -> Buffer<BoxService<Request, Response, BoxError>, Request> {
Buffer::new(BoxService::new(StateService::new(config, network)), 1)
Buffer::new(BoxService::new(StateService::new(config, network)), 3)
}