From 9fe8132e862945fae2da8fe8813aa5511d02268d Mon Sep 17 00:00:00 2001 From: Andronik Date: Sun, 13 Feb 2022 15:00:14 +0100 Subject: [PATCH] Revert "collator-protocol: fix wrong warning (#4909)" This reverts commit c02c24d9bbc80bd012aaeb555bae1a5df1c613df. --- .../collator-protocol/src/collator_side/mod.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/node/network/collator-protocol/src/collator_side/mod.rs b/node/network/collator-protocol/src/collator_side/mod.rs index b1f954b4ccb5..58d6898bc2ac 100644 --- a/node/network/collator-protocol/src/collator_side/mod.rs +++ b/node/network/collator-protocol/src/collator_side/mod.rs @@ -958,7 +958,6 @@ where // but can also include the previous group at // rotation boundaries and considering forks let mut group_validators = HashSet::new(); - let mut maybe_core = None; for relay_parent in state.view.iter().cloned() { tracing::debug!( @@ -971,10 +970,7 @@ where // Determine our assigned core. // If it is not scheduled then ignore the relay parent. let (our_core, num_cores) = match determine_core(ctx, id, relay_parent).await? { - Some(core) => { - maybe_core = Some(core); - core - }, + Some(core) => core, None => continue, }; @@ -991,11 +987,7 @@ where let validators: Vec<_> = group_validators.into_iter().collect(); let no_one_is_assigned = validators.is_empty(); if no_one_is_assigned { - if let Some(core) = maybe_core { - tracing::warn!(target: LOG_TARGET, ?core, "No validators assigned to our core."); - } else { - tracing::debug!(target: LOG_TARGET, "Core is occupied for all active leaves."); - } + tracing::warn!(target: LOG_TARGET, "No validators assigned to our core.",); return Ok(()) } tracing::debug!(