@leofcoin/chain 1.7.131 → 1.7.132

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.
@@ -4760,7 +4760,7 @@ class State extends Contract {
4760
4760
  };
4761
4761
  this.#knownBlocksHandler = async () => {
4762
4762
  return new globalThis.peernet.protos['peernet-response']({
4763
- response: { blocks: this.#blocks.map((block) => block.hash) }
4763
+ response: { blocks: await globalThis.blockStore.keys() }
4764
4764
  });
4765
4765
  };
4766
4766
  this.#loadBlockTransactions = (transactions) => Promise.all(transactions.map(async (transaction) => new TransactionMessage(await peernet.get(transaction))));
package/exports/chain.js CHANGED
@@ -887,7 +887,7 @@ class State extends Contract {
887
887
  };
888
888
  this.#knownBlocksHandler = async () => {
889
889
  return new globalThis.peernet.protos['peernet-response']({
890
- response: { blocks: this.#blocks.map((block) => block.hash) }
890
+ response: { blocks: await globalThis.blockStore.keys() }
891
891
  });
892
892
  };
893
893
  this.#loadBlockTransactions = (transactions) => Promise.all(transactions.map(async (transaction) => new TransactionMessage(await peernet.get(transaction))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/chain",
3
- "version": "1.7.131",
3
+ "version": "1.7.132",
4
4
  "description": "Official javascript implementation",
5
5
  "private": false,
6
6
  "exports": {