File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 88- Respect already received IDONTWANT messages when handling IWANT.
99 See [ PR 5901] ( https://github.com/libp2p/rust-libp2p/pull/5901 )
1010
11+ - Fix messages were not forwarded to floodsub peers.
12+ See [ PR 5908] ( https://github.com/libp2p/rust-libp2p/pull/5908 )
13+
1114## 0.48.0
1215
1316- Allow broadcasting ` IDONTWANT ` messages when publishing to avoid downloading data that is already available.
Original file line number Diff line number Diff line change @@ -2673,15 +2673,17 @@ where
26732673
26742674 // Populate the recipient peers mapping
26752675
2676- // Add explicit peers
2677- for peer_id in & self . explicit_peers {
2678- let Some ( peer) = self . connected_peers . get ( peer_id) else {
2679- continue ;
2680- } ;
2676+ // Add explicit peers and floodsub peers
2677+ for ( peer_id, peer) in & self . connected_peers {
26812678 if Some ( peer_id) != propagation_source
26822679 && !originating_peers. contains ( peer_id)
26832680 && Some ( peer_id) != message. source . as_ref ( )
26842681 && peer. topics . contains ( & message. topic )
2682+ && ( self . explicit_peers . contains ( peer_id)
2683+ || ( peer. kind == PeerKind :: Floodsub
2684+ && !self
2685+ . score_below_threshold ( peer_id, |ts| ts. publish_threshold )
2686+ . 0 ) )
26852687 {
26862688 recipient_peers. insert ( * peer_id) ;
26872689 }
You can’t perform that action at this time.
0 commit comments