consensus: increase buffer for batch redjubjub results

This commit is contained in:
Henry de Valence 2020-11-24 13:07:50 -08:00 committed by teor
parent 61b3286085
commit f798aef843
1 changed files with 5 additions and 4 deletions

View File

@ -62,8 +62,9 @@ pub struct Verifier {
impl Default for Verifier {
fn default() -> Self {
let batch = batch::Verifier::default();
// XXX(hdevalence) what's a reasonable choice here?
let (tx, _) = channel(10);
// This bound should be big enough to avoid RecvErrors
// when tasks wait on results for a long time.
let (tx, _) = channel(512);
Self { tx, batch }
}
}
@ -90,8 +91,8 @@ impl Service<BatchControl<Item>> for Verifier {
match rx.recv().await {
Ok(result) => result,
Err(RecvError::Lagged(_)) => {
tracing::warn!(
"missed channel updates for the correct signature batch!"
tracing::error!(
"batch verification reciever lagged and lost verification results"
);
Err(Error::InvalidSignature)
}