Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
90e89291
Unverified
Commit
90e89291
authored
Sep 22, 2021
by
asynchronous rob
Committed by
GitHub
Sep 22, 2021
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
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
node/core/approval-voting/src/criteria.rs
View file @
90e89291
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment