switch to gossip broadcast for topology updates
This commit is contained in:
1 parent
f4416bfadc
commit
f80410bf59
4 files changed
+8
-10
No files matched your search
+5
-1
@@ -378,7 +378,11 @@ func (router *Router) OnGossipUnicast(sender PeerName, msg []byte) error {
|
||||
}
|
||||
|
||||
func (router *Router) OnGossipBroadcast(update []byte) (GossipData, error) {
|
||||
return nil, fmt.Errorf("unexpected topology gossip broadcast: %v", update)
|
||||
origUpdate, _, err := router.applyTopologyUpdate(update)
|
||||
if err != nil || len(origUpdate) == 0 {
|
||||
return nil, err
|
||||
}
|
||||
return &TopologyGossipData{peers: router.Peers, update: origUpdate}, nil
|
||||
}
|
||||
|
||||
func (router *Router) Gossip() GossipData {
|
||||
|
||||
Reference in new issue
Block a user