@leofcoin/chain 1.7.13 → 1.7.14
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 +2 -0
- package/exports/chain.js +2 -0
- package/package.json +1 -1
package/exports/browser/chain.js
CHANGED
|
@@ -4531,6 +4531,8 @@ class State extends Contract {
|
|
|
4531
4531
|
const hash = await message.hash();
|
|
4532
4532
|
await globalThis.chainStore.put('lastBlock', hash);
|
|
4533
4533
|
globalThis.pubsub.publish('lastBlock', message.encoded);
|
|
4534
|
+
if (!this.#machine)
|
|
4535
|
+
this.#machine = await new Machine(this.#blocks);
|
|
4534
4536
|
await this.#machine.updateState();
|
|
4535
4537
|
}
|
|
4536
4538
|
catch (error) {
|
package/exports/chain.js
CHANGED
|
@@ -898,6 +898,8 @@ class State extends Contract {
|
|
|
898
898
|
const hash = await message.hash();
|
|
899
899
|
await globalThis.chainStore.put('lastBlock', hash);
|
|
900
900
|
globalThis.pubsub.publish('lastBlock', message.encoded);
|
|
901
|
+
if (!this.#machine)
|
|
902
|
+
this.#machine = await new Machine(this.#blocks);
|
|
901
903
|
await this.#machine.updateState();
|
|
902
904
|
}
|
|
903
905
|
catch (error) {
|