mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 16:51:03 +00:00
duplicate logging fix (#2729)
* duplicate logging fix * remove duplicate peer IDs
This commit is contained in:
committed by
GitHub
parent
15a956321a
commit
c503fbc2a0
@@ -412,7 +412,7 @@ impl State {
|
|||||||
if let Some(peer_id) = source.peer_id() {
|
if let Some(peer_id) = source.peer_id() {
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: LOG_TARGET,
|
target: LOG_TARGET,
|
||||||
?source,
|
?peer_id,
|
||||||
?block_hash,
|
?block_hash,
|
||||||
?validator_index,
|
?validator_index,
|
||||||
"Unexpected assignment",
|
"Unexpected assignment",
|
||||||
@@ -437,7 +437,7 @@ impl State {
|
|||||||
if knowledge.get().known_messages.contains(&fingerprint) {
|
if knowledge.get().known_messages.contains(&fingerprint) {
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: LOG_TARGET,
|
target: LOG_TARGET,
|
||||||
?source,
|
?peer_id,
|
||||||
?fingerprint,
|
?fingerprint,
|
||||||
"Duplicate assignment",
|
"Duplicate assignment",
|
||||||
);
|
);
|
||||||
@@ -448,7 +448,7 @@ impl State {
|
|||||||
hash_map::Entry::Vacant(_) => {
|
hash_map::Entry::Vacant(_) => {
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: LOG_TARGET,
|
target: LOG_TARGET,
|
||||||
?source,
|
?peer_id,
|
||||||
?fingerprint,
|
?fingerprint,
|
||||||
"Assignment from a peer is out of view",
|
"Assignment from a peer is out of view",
|
||||||
);
|
);
|
||||||
@@ -462,7 +462,7 @@ impl State {
|
|||||||
if let Some(peer_knowledge) = entry.known_by.get_mut(&peer_id) {
|
if let Some(peer_knowledge) = entry.known_by.get_mut(&peer_id) {
|
||||||
tracing::trace!(
|
tracing::trace!(
|
||||||
target: LOG_TARGET,
|
target: LOG_TARGET,
|
||||||
?source,
|
?peer_id,
|
||||||
?fingerprint,
|
?fingerprint,
|
||||||
"Known assignment",
|
"Known assignment",
|
||||||
);
|
);
|
||||||
@@ -628,7 +628,6 @@ impl State {
|
|||||||
if !entry.knowledge.known_messages.contains(&assignment_fingerprint) {
|
if !entry.knowledge.known_messages.contains(&assignment_fingerprint) {
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: LOG_TARGET,
|
target: LOG_TARGET,
|
||||||
?source,
|
|
||||||
?peer_id,
|
?peer_id,
|
||||||
?fingerprint,
|
?fingerprint,
|
||||||
"Unknown approval assignment",
|
"Unknown approval assignment",
|
||||||
@@ -640,14 +639,14 @@ impl State {
|
|||||||
// check if our knowledge of the peer already contains this approval
|
// check if our knowledge of the peer already contains this approval
|
||||||
match entry.known_by.entry(peer_id.clone()) {
|
match entry.known_by.entry(peer_id.clone()) {
|
||||||
hash_map::Entry::Occupied(knowledge) => {
|
hash_map::Entry::Occupied(knowledge) => {
|
||||||
tracing::debug!(
|
|
||||||
target: LOG_TARGET,
|
|
||||||
?source,
|
|
||||||
?peer_id,
|
|
||||||
?fingerprint,
|
|
||||||
"Duplicate approval",
|
|
||||||
);
|
|
||||||
if knowledge.get().known_messages.contains(&fingerprint) {
|
if knowledge.get().known_messages.contains(&fingerprint) {
|
||||||
|
tracing::debug!(
|
||||||
|
target: LOG_TARGET,
|
||||||
|
?peer_id,
|
||||||
|
?fingerprint,
|
||||||
|
"Duplicate approval",
|
||||||
|
);
|
||||||
|
|
||||||
modify_reputation(ctx, peer_id, COST_DUPLICATE_MESSAGE).await;
|
modify_reputation(ctx, peer_id, COST_DUPLICATE_MESSAGE).await;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -655,7 +654,6 @@ impl State {
|
|||||||
hash_map::Entry::Vacant(_) => {
|
hash_map::Entry::Vacant(_) => {
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: LOG_TARGET,
|
target: LOG_TARGET,
|
||||||
?source,
|
|
||||||
?peer_id,
|
?peer_id,
|
||||||
?fingerprint,
|
?fingerprint,
|
||||||
"Approval from a peer is out of view",
|
"Approval from a peer is out of view",
|
||||||
@@ -668,7 +666,6 @@ impl State {
|
|||||||
if entry.knowledge.known_messages.contains(&fingerprint) {
|
if entry.knowledge.known_messages.contains(&fingerprint) {
|
||||||
tracing::trace!(
|
tracing::trace!(
|
||||||
target: LOG_TARGET,
|
target: LOG_TARGET,
|
||||||
?source,
|
|
||||||
?peer_id,
|
?peer_id,
|
||||||
?fingerprint,
|
?fingerprint,
|
||||||
"Known approval",
|
"Known approval",
|
||||||
@@ -700,7 +697,6 @@ impl State {
|
|||||||
|
|
||||||
tracing::trace!(
|
tracing::trace!(
|
||||||
target: LOG_TARGET,
|
target: LOG_TARGET,
|
||||||
?source,
|
|
||||||
?peer_id,
|
?peer_id,
|
||||||
?fingerprint,
|
?fingerprint,
|
||||||
?result,
|
?result,
|
||||||
|
|||||||
Reference in New Issue
Block a user