From f798aef843f6f8a4468ee37e5f0c541a8cf7607f Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Tue, 24 Nov 2020 13:07:50 -0800 Subject: [PATCH] consensus: increase buffer for batch redjubjub results --- zebra-consensus/src/primitives/redjubjub.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/zebra-consensus/src/primitives/redjubjub.rs b/zebra-consensus/src/primitives/redjubjub.rs index 472312ae5..465d59d9a 100644 --- a/zebra-consensus/src/primitives/redjubjub.rs +++ b/zebra-consensus/src/primitives/redjubjub.rs @@ -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> 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) }