mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-10 08:43:09 +00:00
protocol ID for gossipsub v1.1
This commit is contained in:
parent
195f86bd90
commit
73af710419
@ -98,6 +98,7 @@ type connectInfo struct {
|
||||
|
||||
func (gs *GossipSubRouter) Protocols() []protocol.ID {
|
||||
return []protocol.ID{GossipSubID_v11, GossipSubID_v10, FloodSubID}
|
||||
return []protocol.ID{GossipSubID_v11, GossipSubID, FloodSubID}
|
||||
}
|
||||
|
||||
func (gs *GossipSubRouter) Attach(p *PubSub) {
|
||||
@ -863,6 +864,7 @@ func (gs *GossipSubRouter) getPeers(topic string, count int, filter func(peer.ID
|
||||
peers := make([]peer.ID, 0, len(tmap))
|
||||
for p := range tmap {
|
||||
if (gs.peers[p] == GossipSubID_v10 || gs.peers[p] == GossipSubID_v11) && filter(p) {
|
||||
if (gs.peers[p] == GossipSubID || gs.peers[p] == GossipSubID_v11) && filter(p) {
|
||||
peers = append(peers, p)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user