peer exchange on prune

This commit is contained in:
vyzo 2019-11-22 00:09:37 +02:00
parent 73af710419
commit 6b80c4078d

View File

@ -98,7 +98,6 @@ 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) {
@ -864,7 +863,6 @@ 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)
}
}