mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 08:47:57 +00:00
collator-protocol: fix wrong warning (#4909)
* collator-protocol: fix wrong warning * collator-protocol: add debug log
This commit is contained in:
@@ -958,6 +958,7 @@ 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!(
|
||||
@@ -970,7 +971,10 @@ 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) => core,
|
||||
Some(core) => {
|
||||
maybe_core = Some(core);
|
||||
core
|
||||
},
|
||||
None => continue,
|
||||
};
|
||||
|
||||
@@ -987,7 +991,11 @@ where
|
||||
let validators: Vec<_> = group_validators.into_iter().collect();
|
||||
let no_one_is_assigned = validators.is_empty();
|
||||
if no_one_is_assigned {
|
||||
tracing::warn!(target: LOG_TARGET, "No validators assigned to our core.",);
|
||||
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.");
|
||||
}
|
||||
return Ok(())
|
||||
}
|
||||
tracing::debug!(
|
||||
|
||||
Reference in New Issue
Block a user