@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.
@@ -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
- this.knownBlocks = await this.#makeRequest(peer, 'knownBlocks');
5910
- console.log({ knownBlocks: this.knownBlocks });
5911
- for (const hash of this.knownBlocks) {
5912
- this.wantList.push(hash);
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
- this.knownBlocks = await this.#makeRequest(peer, 'knownBlocks');
2050
- console.log({ knownBlocks: this.knownBlocks });
2051
- for (const hash of this.knownBlocks) {
2052
- this.wantList.push(hash);
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/chain",
3
- "version": "1.7.148",
3
+ "version": "1.7.149",
4
4
  "description": "Official javascript implementation",
5
5
  "private": false,
6
6
  "exports": {