@leofcoin/chain 1.7.148 → 1.7.149
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/chain.js +5 -5
- package/exports/chain.js +5 -5
- package/package.json +1 -1
package/exports/browser/chain.js
CHANGED
|
@@ -5906,11 +5906,11 @@ class Chain extends VersionControl {
|
|
|
5906
5906
|
const higherThenCurrentLocal = !localBlock?.index ? true : lastBlock.index > localBlock.index;
|
|
5907
5907
|
if (lastBlock) {
|
|
5908
5908
|
if (!this.lastBlock || higherThenCurrentLocal) {
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5909
|
+
const knownBlocksResponse = await this.#makeRequest(peer, 'knownBlocks');
|
|
5910
|
+
if (knownBlocksResponse.blocks)
|
|
5911
|
+
for (const hash of knownBlocksResponse.blocks) {
|
|
5912
|
+
this.wantList.push(hash);
|
|
5913
|
+
}
|
|
5914
5914
|
}
|
|
5915
5915
|
}
|
|
5916
5916
|
if (this.wantList.length > 0) {
|
package/exports/chain.js
CHANGED
|
@@ -2046,11 +2046,11 @@ class Chain extends VersionControl {
|
|
|
2046
2046
|
const higherThenCurrentLocal = !localBlock?.index ? true : lastBlock.index > localBlock.index;
|
|
2047
2047
|
if (lastBlock) {
|
|
2048
2048
|
if (!this.lastBlock || higherThenCurrentLocal) {
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2049
|
+
const knownBlocksResponse = await this.#makeRequest(peer, 'knownBlocks');
|
|
2050
|
+
if (knownBlocksResponse.blocks)
|
|
2051
|
+
for (const hash of knownBlocksResponse.blocks) {
|
|
2052
|
+
this.wantList.push(hash);
|
|
2053
|
+
}
|
|
2054
2054
|
}
|
|
2055
2055
|
}
|
|
2056
2056
|
if (this.wantList.length > 0) {
|