File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { identify } from "@libp2p/identify";
5
5
import { mplex } from "@libp2p/mplex" ;
6
6
import { ping } from "@libp2p/ping" ;
7
7
import { webSockets } from "@libp2p/websockets" ;
8
- import { all as filterAll } from "@libp2p/websockets/filters" ;
8
+ import { all as filterAll , wss } from "@libp2p/websockets/filters" ;
9
9
import { wakuMetadata } from "@waku/core" ;
10
10
import {
11
11
type CreateLibp2pOptions ,
@@ -64,11 +64,13 @@ export async function defaultLibp2p(
64
64
? { metadata : wakuMetadata ( shardInfo ) }
65
65
: { } ;
66
66
67
+ const filter = process ?. env ?. NODE_ENV === "test" ? filterAll : wss ;
68
+
67
69
return createLibp2p ( {
68
70
connectionManager : {
69
71
minConnections : 1
70
72
} ,
71
- transports : [ webSockets ( { filter : filterAll } ) ] ,
73
+ transports : [ webSockets ( { filter } ) ] ,
72
74
streamMuxers : [ mplex ( ) ] ,
73
75
connectionEncryption : [ noise ( ) ] ,
74
76
...options ,
You can’t perform that action at this time.
0 commit comments