From 0f0a5c0b4567175a5611c373cf8644442fbe6da4 Mon Sep 17 00:00:00 2001 From: Robert Klotzner Date: Tue, 31 Aug 2021 18:18:12 +0200 Subject: [PATCH] More debugging output. --- node/core/dispute-coordinator/src/real/mod.rs | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/node/core/dispute-coordinator/src/real/mod.rs b/node/core/dispute-coordinator/src/real/mod.rs index 3c2c4e6b788b..498a675bec84 100644 --- a/node/core/dispute-coordinator/src/real/mod.rs +++ b/node/core/dispute-coordinator/src/real/mod.rs @@ -882,7 +882,7 @@ async fn issue_local_statement( // Do import if !statements.is_empty() { - let (pending_confirmation, _rx) = oneshot::channel(); + let (pending_confirmation, rx) = oneshot::channel(); handle_import_statements( ctx, overlay_db, @@ -895,6 +895,32 @@ async fn issue_local_statement( pending_confirmation, ) .await?; + match rx.await { + Err(_) => { + tracing::error!( + target: LOG_TARGET, + ?candidate_hash, + ?session, + "pending confirmation receiver got dropped by `handle_import_statements` for our own votes!" + ); + } + Ok(ImportStatementsResult::InvalidImport) => { + tracing::error!( + target: LOG_TARGET, + ?candidate_hash, + ?session, + "handle_import_statements` considers our own votes invalid!" + ); + } + Ok(ImportStatementsResult::ValidImport) => { + tracing::trace!( + target: LOG_TARGET, + ?candidate_hash, + ?session, + "handle_import_statements` successfully imported our vote!" + ); + } + } } Ok(())