@leofcoin/chain 1.5.10 → 1.5.11

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.
@@ -1238,6 +1238,7 @@ class State extends Contract {
1238
1238
  this.#lastBlock = { hash, ...message.decoded };
1239
1239
  // await this.state.updateState(message)
1240
1240
  await globalThis.chainStore.put('lastBlock', hash);
1241
+ globalThis.pubsub.publish('lastBlock', this.#lastBlock);
1241
1242
  }
1242
1243
  async #lastBlockHandler() {
1243
1244
  return new globalThis.peernet.protos['peernet-response']({ response: { hash: this.#lastBlock?.hash, index: this.#lastBlock?.index } });
package/exports/chain.js CHANGED
@@ -678,6 +678,7 @@ class State extends Contract {
678
678
  this.#lastBlock = { hash, ...message.decoded };
679
679
  // await this.state.updateState(message)
680
680
  await globalThis.chainStore.put('lastBlock', hash);
681
+ globalThis.pubsub.publish('lastBlock', this.#lastBlock);
681
682
  }
682
683
  async #lastBlockHandler() {
683
684
  return new globalThis.peernet.protos['peernet-response']({ response: { hash: this.#lastBlock?.hash, index: this.#lastBlock?.index } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/chain",
3
- "version": "1.5.10",
3
+ "version": "1.5.11",
4
4
  "description": "Official javascript implementation",
5
5
  "exports": {
6
6
  "./node": "./exports/node.js",