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
8881b4d0
Unverified
Commit
8881b4d0
authored
Mar 24, 2021
by
Arkadiy Paronyan
Committed by
GitHub
Mar 24, 2021
Browse files
Tweaked logging (#2695)
* Tweaked logging * Debug for Statement
parent
35501275
Pipeline
#130378
failed with stages
in 22 minutes and 52 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
node/network/approval-distribution/src/lib.rs
View file @
8881b4d0
...
...
@@ -413,7 +413,6 @@ impl State {
tracing
::
debug!
(
target
:
LOG_TARGET
,
?
source
,
?
peer_id
,
?
block_hash
,
?
validator_index
,
"Unexpected assignment"
,
...
...
@@ -439,7 +438,6 @@ impl State {
tracing
::
debug!
(
target
:
LOG_TARGET
,
?
source
,
?
peer_id
,
?
fingerprint
,
"Duplicate assignment"
,
);
...
...
@@ -451,9 +449,8 @@ impl State {
tracing
::
debug!
(
target
:
LOG_TARGET
,
?
source
,
?
peer_id
,
?
fingerprint
,
"Assignment from
unknown peer
"
,
"Assignment from
a peer is out of view
"
,
);
modify_reputation
(
ctx
,
peer_id
.clone
(),
COST_UNEXPECTED_MESSAGE
)
.await
;
}
...
...
@@ -466,7 +463,6 @@ impl State {
tracing
::
trace!
(
target
:
LOG_TARGET
,
?
source
,
?
peer_id
,
?
fingerprint
,
"Known assignment"
,
);
...
...
@@ -497,7 +493,6 @@ impl State {
tracing
::
trace!
(
target
:
LOG_TARGET
,
?
source
,
?
peer_id
,
?
fingerprint
,
?
result
,
"Checked assignment"
,
...
...
@@ -663,7 +658,7 @@ impl State {
?
source
,
?
peer_id
,
?
fingerprint
,
"Approval from
unknown peer
"
,
"Approval from
a peer is out of view
"
,
);
modify_reputation
(
ctx
,
peer_id
.clone
(),
COST_UNEXPECTED_MESSAGE
)
.await
;
}
...
...
node/network/availability-recovery/src/lib.rs
View file @
8881b4d0
...
...
@@ -395,7 +395,7 @@ impl RequestChunksPhase {
COST_MERKLE_PROOF_INVALID
,
))
.await
?
;
}
else
{
tracing
::
debug
!
(
tracing
::
trace
!
(
target
:
LOG_TARGET
,
validator
=
?
peer_id
,
?
validator_index
,
...
...
node/primitives/src/lib.rs
View file @
8881b4d0
...
...
@@ -44,7 +44,7 @@ pub mod approval;
/// it gives access to the commitments to validators who have not executed the candidate. This
/// is necessary to allow a block-producing validator to include candidates from outside of the para
/// it is assigned to.
#[derive(
Debug,
Clone,
PartialEq,
Eq,
Encode,
Decode)]
#[derive(Clone,
PartialEq,
Eq,
Encode,
Decode)]
pub
enum
Statement
{
/// A statement that a validator seconds a candidate.
#[codec(index
=
1
)]
...
...
@@ -54,6 +54,15 @@ pub enum Statement {
Valid
(
CandidateHash
),
}
impl
std
::
fmt
::
Debug
for
Statement
{
fn
fmt
(
&
self
,
f
:
&
mut
std
::
fmt
::
Formatter
<
'_
>
)
->
std
::
fmt
::
Result
{
match
self
{
Statement
::
Seconded
(
seconded
)
=>
write!
(
f
,
"Seconded: {:?}"
,
seconded
.descriptor
),
Statement
::
Valid
(
hash
)
=>
write!
(
f
,
"Valid: {:?}"
,
hash
),
}
}
}
impl
Statement
{
/// Get the candidate hash referenced by this statement.
///
...
...
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