mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
net/strategy: Log bad peerId from on_validated_block_announce (#4051)
This tiny PR extends the `on_validated_block_announce` log with the bad PeerID. Used to identify if the peerID is malicious by correlating with other logs (ie peer-set). While at it, have removed the `\n` from a multiline log, which did not play well with [sub-triage-logs](https://github.com/lexnv/sub-triage-logs/tree/master). cc @paritytech/networking --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -1063,7 +1063,7 @@ where
|
||||
let peer = if let Some(peer) = self.peers.get_mut(&peer_id) {
|
||||
peer
|
||||
} else {
|
||||
error!(target: LOG_TARGET, "💔 Called `on_validated_block_announce` with a bad peer ID");
|
||||
error!(target: LOG_TARGET, "💔 Called `on_validated_block_announce` with a bad peer ID {peer_id}");
|
||||
return Some((hash, number))
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user