File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1313
1414- Remove false ` debug_assert ` on ` connected_peers ` (see [ PR 2120] ).
1515
16+ - Return correct number of remaining bootstrap requests (see [ PR 2125] ).
17+
1618[ PR 2087 ] : https://github.com/libp2p/rust-libp2p/pull/2087
1719[ PR 2120 ] : https://github.com/libp2p/rust-libp2p/pull/2120
20+ [ PR 2125 ] : https://github.com/libp2p/rust-libp2p/pull/2125
1821
1922# 0.30.0 [ 2021-04-13]
2023
Original file line number Diff line number Diff line change @@ -1113,7 +1113,7 @@ where
11131113 } ) . collect :: < Vec < _ > > ( ) . into_iter ( )
11141114 } ) ;
11151115
1116- let num_remaining = remaining. len ( ) . saturating_sub ( 1 ) as u32 ;
1116+ let num_remaining = remaining. len ( ) as u32 ;
11171117
11181118 if let Some ( target) = remaining. next ( ) {
11191119 let info = QueryInfo :: Bootstrap {
Original file line number Diff line number Diff line change @@ -196,6 +196,10 @@ fn bootstrap() {
196196 }
197197 first = false ;
198198 if ok. num_remaining == 0 {
199+ assert_eq ! (
200+ swarm. behaviour_mut( ) . queries. size( ) , 0 ,
201+ "Expect no remaining queries when `num_remaining` is zero." ,
202+ ) ;
199203 let mut known = HashSet :: new ( ) ;
200204 for b in swarm. behaviour_mut ( ) . kbuckets . iter ( ) {
201205 for e in b. iter ( ) {
You can’t perform that action at this time.
0 commit comments