File tree 2 files changed +10
-5
lines changed
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 8
8
- Respect already received IDONTWANT messages when handling IWANT.
9
9
See [ PR 5901] ( https://github.com/libp2p/rust-libp2p/pull/5901 )
10
10
11
+ - Fix messages were not forwarded to floodsub peers.
12
+ See [ PR 5908] ( https://github.com/libp2p/rust-libp2p/pull/5908 )
13
+
11
14
## 0.48.0
12
15
13
16
- 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
2673
2673
2674
2674
// Populate the recipient peers mapping
2675
2675
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 {
2681
2678
if Some ( peer_id) != propagation_source
2682
2679
&& !originating_peers. contains ( peer_id)
2683
2680
&& Some ( peer_id) != message. source . as_ref ( )
2684
2681
&& 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 ) )
2685
2687
{
2686
2688
recipient_peers. insert ( * peer_id) ;
2687
2689
}
You can’t perform that action at this time.
0 commit comments