-
Notifications
You must be signed in to change notification settings - Fork 109
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/network: fix grandpa protocol ID #1466
Conversation
…/fix-finality-protocol
Codecov Report
@@ Coverage Diff @@
## development #1466 +/- ##
===============================================
+ Coverage 57.70% 57.85% +0.14%
===============================================
Files 152 152
Lines 15315 15226 -89
===============================================
- Hits 8838 8809 -29
+ Misses 4931 4873 -58
+ Partials 1546 1544 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
func (h *host) broadcast(msg Message) { | ||
for _, p := range h.peers() { | ||
err := h.send(p, "", msg) | ||
if err != nil { | ||
logger.Error("Failed to broadcast message to peer", "peer", p, "error", err) | ||
} | ||
} | ||
} | ||
|
||
// broadcastExcluding sends a message to each connected peer except specified peer | ||
func (h *host) broadcastExcluding(msg Message, peer peer.ID) { //nolint | ||
for _, p := range h.peers() { | ||
if p != peer { | ||
err := h.send(p, "", msg) | ||
if err != nil { | ||
logger.Error("Failed to send message during broadcast", "peer", p, "err", err) | ||
} | ||
} | ||
} | ||
} | ||
|
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.
I'm assuming these are being removed because they're not needed, is there no longer a need to broadcast messages?
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.
yes, they weren't actually being used anywhere. notifications messages are still being "broadcast" (gossiped) in the broadcastExcluding
function in notifications.go
noot: fix:dot/network: fix grandpa protocol ID (#1466)
Changes
/ksmcc3
, however thegrandpa
protocol is not prefixed, the protocol ID is just/paritytech/grandpa/1
Tests
Issues