-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dot/netwok): check for duplicate message earlier #2435
Changes from all commits
47f2d11
71c6b70
f724864
25ddeba
844651a
b7de7eb
1eccacb
495e5dc
c766bfd
e8f6806
f2b81ff
7a0f099
950e476
a36d66e
1a042d8
5a5ba2d
1fcfb7f
41d1f45
67ace9e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,10 @@ func (h *Handler) RemovePeer(setID int, peers ...peer.ID) { | |
|
||
// ReportPeer reports ReputationChange according to the peer behaviour. | ||
func (h *Handler) ReportPeer(rep ReputationChange, peers ...peer.ID) { | ||
for _, pid := range peers { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is there a way to check logging level? so we don't range across peers if package logging level isn't trace or debug. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We always ever pass a single peer for this method (slightly related comment), so it's fine really. |
||
logger.Debugf("reporting reputation change of %d to peer %s, reason: %s", rep.Value, pid, rep.Reason) | ||
} | ||
|
||
kishansagathiya marked this conversation as resolved.
Show resolved
Hide resolved
|
||
h.actionQueue <- action{ | ||
actionCall: reportPeer, | ||
reputation: rep, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit named returns would be nice