Skip to content

Commit

Permalink
Improve logs also
Browse files Browse the repository at this point in the history
  • Loading branch information
AgeManning committed Feb 28, 2024
1 parent 3d0ac1a commit 4573be0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions beacon_node/lighthouse_network/src/peer_manager/peerdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ impl<TSpec: EthSpec> PeerDB<TSpec> {
ScoreTransitionResult::Banned
}
(ScoreState::ForcedDisconnect, ScoreState::Banned | ScoreState::Healthy) => {
debug!(log, "Peer transitioned to disconnect state"; "peer_id" => %peer_id, "score" => %info.score(), "past_state" => %previous_state);
debug!(log, "Peer transitioned to forced disconnect score state"; "peer_id" => %peer_id, "score" => %info.score(), "past_score_state" => %previous_state);
// disconnect the peer if it's currently connected or dialing
if info.is_connected_or_dialing() {
ScoreTransitionResult::Disconnected
Expand All @@ -1080,11 +1080,11 @@ impl<TSpec: EthSpec> PeerDB<TSpec> {
}
}
(ScoreState::Healthy, ScoreState::ForcedDisconnect) => {
debug!(log, "Peer transitioned to healthy state"; "peer_id" => %peer_id, "score" => %info.score(), "past_state" => %previous_state);
debug!(log, "Peer transitioned to healthy score state"; "peer_id" => %peer_id, "score" => %info.score(), "past_score_state" => %previous_state);
ScoreTransitionResult::NoAction
}
(ScoreState::Healthy, ScoreState::Banned) => {
debug!(log, "Peer transitioned to healthy state"; "peer_id" => %peer_id, "score" => %info.score(), "past_state" => %previous_state);
debug!(log, "Peer transitioned to healthy score state"; "peer_id" => %peer_id, "score" => %info.score(), "past_score_state" => %previous_state);
// unban the peer if it was previously banned.
ScoreTransitionResult::Unbanned
}
Expand Down

0 comments on commit 4573be0

Please sign in to comment.