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