@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.
- package/exports/browser/chain.js +1 -0
- package/exports/chain.js +1 -0
- package/package.json +1 -1
package/exports/browser/chain.js
CHANGED
|
@@ -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 } });
|