@leofcoin/chain 1.7.11 → 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/chain.js CHANGED
@@ -724,7 +724,7 @@ class State extends Contract {
724
724
  * contains transactions we need before we can successfully load
725
725
  */
726
726
  get wantList() {
727
- return this.#machine.wantList ?? this._wantList;
727
+ return this.#machine?.wantList ?? this._wantList;
728
728
  }
729
729
  get state() {
730
730
  return {
@@ -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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/chain",
3
- "version": "1.7.11",
3
+ "version": "1.7.14",
4
4
  "description": "Official javascript implementation",
5
5
  "private": false,
6
6
  "exports": {