diff --git a/libp2p/protocols/pubsub/gossipsub.nim b/libp2p/protocols/pubsub/gossipsub.nim index d5de70677..3b89a1c50 100644 --- a/libp2p/protocols/pubsub/gossipsub.nim +++ b/libp2p/protocols/pubsub/gossipsub.nim @@ -84,7 +84,7 @@ proc replenishFanout(g: GossipSub, topic: string) = if g.fanout[topic].len < GossipSubDLo: debug "replenishing fanout", peers = g.fanout[topic].len for id, peer in g.peers: - if peer.topics.find(topic) != -1: # linear search but likely faster then a small hash + if peer.proto == GossipSubCodec and peer.topics.find(topic) != -1: # linear search but likely faster then a small hash if not g.fanout[topic].containsOrIncl(id): g.lastFanoutPubSub[topic] = Moment.fromNow(GossipSubFanoutTTL) if g.fanout.getOrDefault(topic).len == GossipSubD: diff --git a/libp2p/protocols/pubsub/pubsubpeer.nim b/libp2p/protocols/pubsub/pubsubpeer.nim index 681c511cf..c820c212b 100644 --- a/libp2p/protocols/pubsub/pubsubpeer.nim +++ b/libp2p/protocols/pubsub/pubsubpeer.nim @@ -32,7 +32,7 @@ type onSend*: proc(peer: PubSubPeer; msgs: var RPCMsg) {.gcsafe, raises: [Defect].} PubSubPeer* = ref object of RootObj - proto: string # the protocol that this peer joined from + proto*: string # the protocol that this peer joined from sendConn: Connection peerInfo*: PeerInfo handler*: RPCHandler