helia-coord 1.4.1 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -124,26 +124,26 @@ class RelayUseCases {
|
|
|
124
124
|
// Renew the connection to each circuit relay in the state.
|
|
125
125
|
async connectToCRs (thisNode) {
|
|
126
126
|
try {
|
|
127
|
-
console.log('starting connectToCRs()')
|
|
127
|
+
// console.log('starting connectToCRs()')
|
|
128
128
|
let knownRelays = thisNode.relayData
|
|
129
129
|
|
|
130
130
|
// Sort the Relays by their latency. This way Relays with the lowest latency
|
|
131
131
|
// (relative to thisNode) are used first.
|
|
132
132
|
knownRelays = this.sortRelays(knownRelays)
|
|
133
|
-
console.log('knownRelays: ', knownRelays)
|
|
133
|
+
// console.log('knownRelays: ', knownRelays)
|
|
134
134
|
|
|
135
135
|
// Loop through each relay.
|
|
136
136
|
for (let i = 0; i < knownRelays.length; i++) {
|
|
137
137
|
const thisRelay = knownRelays[i]
|
|
138
|
-
console.log('thisRelay: ', thisRelay)
|
|
138
|
+
// console.log('thisRelay: ', thisRelay)
|
|
139
139
|
|
|
140
140
|
// Get connected peers
|
|
141
141
|
const connectedPeers = await this.adapters.ipfs.getPeers()
|
|
142
|
-
console.log('connectedPeers: ', connectedPeers)
|
|
142
|
+
// console.log('connectedPeers: ', connectedPeers)
|
|
143
143
|
|
|
144
144
|
// Check if target circuit-relay is currently conected to the node.
|
|
145
145
|
const connectedPeer = connectedPeers.filter(peerId => thisRelay.ipfsId.includes(peerId))
|
|
146
|
-
console.log('connectedPeer: ', connectedPeer)
|
|
146
|
+
// console.log('connectedPeer: ', connectedPeer)
|
|
147
147
|
|
|
148
148
|
// Get the peer data corresponding to this relay
|
|
149
149
|
// let peerData = thisNode.peerData.filter(x => x.from.includes(thisRelay.ipfsId))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "helia-coord",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "A JS library for helping IPFS peers coordinate, find a common interest, and stay connected around that interest.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"uuid": "9.0.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"libp2p": "0.46.
|
|
50
|
+
"libp2p": ">0.46.14"
|
|
51
51
|
},
|
|
52
52
|
"exports": {
|
|
53
53
|
".": {
|