Unverified Commit 90e89291 authored by asynchronous rob's avatar asynchronous rob Committed by GitHub
Browse files

add tracing to assignment criteria (#3886)

* add tracing to assignment criteria

* fmt
parent e9c4bc1e
Pipeline #158549 passed with stages
in 42 minutes and 27 seconds
......@@ -236,6 +236,14 @@ pub(crate) fn compute_assignments(
config.assignment_keys.is_empty() ||
config.validator_groups.is_empty()
{
tracing::trace!(
target: LOG_TARGET,
n_cores = config.n_cores,
has_assignment_keys = !config.assignment_keys.is_empty(),
has_validator_groups = !config.validator_groups.is_empty(),
"Not producing assignments because config is degenerate",
);
return HashMap::new()
}
......@@ -254,7 +262,10 @@ pub(crate) fn compute_assignments(
});
match key {
None => return Default::default(),
None => {
tracing::trace!(target: LOG_TARGET, "No assignment key");
return Default::default()
},
Some(k) => k,
}
};
......@@ -266,6 +277,12 @@ pub(crate) fn compute_assignments(
.map(|(c_hash, core, _)| (c_hash, core))
.collect::<Vec<_>>();
tracing::trace!(
target: LOG_TARGET,
assignable_cores = leaving_cores.len(),
"Assigning to candidates from different backing groups"
);
let assignments_key: &sp_application_crypto::sr25519::Pair = assignments_key.as_ref();
let assignments_key: &schnorrkel::Keypair = assignments_key.as_ref();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment