File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -139,17 +139,21 @@ describe('peer discovery scenarios', () => {
139
139
} ,
140
140
dht : {
141
141
randomWalk : {
142
- enabled : true ,
142
+ enabled : false ,
143
143
delay : 1000 , // start the first query quickly
144
144
interval : 10000 ,
145
- timeout : 1000
145
+ timeout : 5000
146
146
} ,
147
147
enabled : true
148
148
}
149
149
}
150
150
} )
151
151
152
- libp2p = new Libp2p ( getConfig ( peerInfo ) )
152
+ const localConfig = getConfig ( peerInfo )
153
+ // Only run random walk on our local node
154
+ localConfig . config . dht . randomWalk . enabled = true
155
+ libp2p = new Libp2p ( localConfig )
156
+
153
157
const remoteLibp2p1 = new Libp2p ( getConfig ( remotePeerInfo1 ) )
154
158
const remoteLibp2p2 = new Libp2p ( getConfig ( remotePeerInfo2 ) )
155
159
@@ -161,6 +165,7 @@ describe('peer discovery scenarios', () => {
161
165
} )
162
166
163
167
await Promise . all ( [
168
+ libp2p . start ( ) ,
164
169
remoteLibp2p1 . start ( ) ,
165
170
remoteLibp2p2 . start ( )
166
171
] )
@@ -173,8 +178,6 @@ describe('peer discovery scenarios', () => {
173
178
remoteLibp2p2 . dial ( remotePeerInfo1 )
174
179
] )
175
180
176
- libp2p . start ( )
177
-
178
181
await deferred . promise
179
182
return Promise . all ( [
180
183
remoteLibp2p1 . stop ( ) ,
You can’t perform that action at this time.
0 commit comments