mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-09 08:13:10 +00:00
don't add direct peers to fanout
This commit is contained in:
parent
a86ae585a6
commit
3a81c24073
@ -903,7 +903,8 @@ func (gs *GossipSubRouter) Publish(msg *Message) {
|
||||
if !ok || len(gmap) == 0 {
|
||||
// we don't have any, pick some with score above the publish threshold
|
||||
peers := gs.getPeers(topic, gs.D, func(p peer.ID) bool {
|
||||
return gs.score.Score(p) >= gs.publishThreshold
|
||||
_, direct := gs.direct[p]
|
||||
return !direct && gs.score.Score(p) >= gs.publishThreshold
|
||||
})
|
||||
|
||||
if len(peers) > 0 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user