Skip to content

Commit

Permalink
deps: upgrade circuit-relay
Browse files Browse the repository at this point in the history
  • Loading branch information
d-roak committed Dec 22, 2024
1 parent b9711a8 commit 39526c7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/network/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@chainsafe/libp2p-yamux": "^7.0.1",
"@libp2p/autonat": "^2.0.6",
"@libp2p/bootstrap": "^11.0.6",
"@libp2p/circuit-relay-v2": "^2.1.5",
"@libp2p/circuit-relay-v2": "^3.1.3",
"@libp2p/crypto": "^5.0.5",
"@libp2p/dcutr": "^2.0.6",
"@libp2p/devtools-metrics": "^1.1.5",
Expand Down
12 changes: 4 additions & 8 deletions packages/network/src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ export class DRPNetworkNode {
this._node = await createLibp2p({
privateKey: this._privateKey,
addresses: {
listen: this._config?.addresses ? this._config.addresses : ["/webrtc"],
listen: this._config?.addresses
? this._config.addresses
: ["/p2p-circuit", "/webrtc"],
},
connectionEncrypters: [noise()],
connectionGater: {
Expand All @@ -130,10 +132,7 @@ export class DRPNetworkNode {
services: this._config?.bootstrap ? _bootstrap_services : _node_services,
streamMuxers: [yamux()],
transports: [
circuitRelayTransport({
discoverRelays: 2,
reservationConcurrency: 1,
}),
circuitRelayTransport(),
webRTC(),
webRTCDirect(),
webSockets({
Expand All @@ -143,9 +142,6 @@ export class DRPNetworkNode {
],
});

console.log(this._node.status);
console.log("ma:", this._node.getMultiaddrs());

if (!this._config?.bootstrap) {
for (const addr of this._config?.bootstrap_peers || []) {
try {
Expand Down
20 changes: 10 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 39526c7

Please sign in to comment.