@leofcoin/chain 1.7.81 → 1.7.83
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.
- package/exports/browser/{client-D9SOK3zV-QaAScGtB.js → client-Vbt0C3YZ-BSi2TKqM.js} +1 -1
- package/exports/browser/{messages-CWqbyda0-C1443uum.js → messages-BYZZUpuv-MiKV0Pk4.js} +1 -1
- package/exports/browser/{node-browser-BKkQNXGr.js → node-browser-CsSAehTl.js} +12 -3
- package/exports/browser/node-browser.js +1 -1
- package/package.json +2 -2
|
@@ -8385,6 +8385,7 @@ class Peernet {
|
|
|
8385
8385
|
_peerHandler;
|
|
8386
8386
|
protos;
|
|
8387
8387
|
version;
|
|
8388
|
+
#peerAttempts = {};
|
|
8388
8389
|
/**
|
|
8389
8390
|
* @access public
|
|
8390
8391
|
* @param {Object} options
|
|
@@ -8495,7 +8496,7 @@ class Peernet {
|
|
|
8495
8496
|
this.root = options.root;
|
|
8496
8497
|
const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
|
|
8497
8498
|
// FolderMessageResponse
|
|
8498
|
-
} = await import(/* webpackChunkName: "messages" */ './messages-
|
|
8499
|
+
} = await import(/* webpackChunkName: "messages" */ './messages-BYZZUpuv-MiKV0Pk4.js');
|
|
8499
8500
|
/**
|
|
8500
8501
|
* proto Object containing protos
|
|
8501
8502
|
* @type {Object}
|
|
@@ -8589,7 +8590,7 @@ class Peernet {
|
|
|
8589
8590
|
if (this.#starting || this.#started)
|
|
8590
8591
|
return;
|
|
8591
8592
|
this.#starting = true;
|
|
8592
|
-
const importee = await import('./client-
|
|
8593
|
+
const importee = await import('./client-Vbt0C3YZ-BSi2TKqM.js');
|
|
8593
8594
|
/**
|
|
8594
8595
|
* @access public
|
|
8595
8596
|
* @type {PeernetClient}
|
|
@@ -8848,7 +8849,15 @@ class Peernet {
|
|
|
8848
8849
|
debug(`Error while requesting data from ${id}`, error);
|
|
8849
8850
|
// if error, remove provider
|
|
8850
8851
|
this.dht.removeProvider(id, hash);
|
|
8851
|
-
|
|
8852
|
+
if (this.#peerAttempts[id] > 1) {
|
|
8853
|
+
this.#peerAttempts[id] = 0;
|
|
8854
|
+
debug(`Removed provider ${id} for ${hash} after 3 attempts`);
|
|
8855
|
+
console.error(nothingFoundError(hash));
|
|
8856
|
+
return undefined;
|
|
8857
|
+
}
|
|
8858
|
+
if (this.#peerAttempts[id] === undefined)
|
|
8859
|
+
this.#peerAttempts[id] = 0;
|
|
8860
|
+
this.#peerAttempts[id]++;
|
|
8852
8861
|
return this.requestData(hash, store?.name || store);
|
|
8853
8862
|
}
|
|
8854
8863
|
// this.put(hash, proto.decoded.data)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leofcoin/chain",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.83",
|
|
4
4
|
"description": "Official javascript implementation",
|
|
5
5
|
"private": false,
|
|
6
6
|
"exports": {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@leofcoin/messages": "^1.4.40",
|
|
70
70
|
"@leofcoin/multi-wallet": "^3.1.8",
|
|
71
71
|
"@leofcoin/networks": "^1.1.25",
|
|
72
|
-
"@leofcoin/peernet": "^1.1.
|
|
72
|
+
"@leofcoin/peernet": "^1.1.92",
|
|
73
73
|
"@leofcoin/storage": "^3.5.38",
|
|
74
74
|
"@leofcoin/utils": "^1.1.39",
|
|
75
75
|
"@leofcoin/workers": "^1.5.23",
|