@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/browser/chain.js +676 -657
- package/exports/chain.js +3 -1
- package/package.json +1 -1
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
|
|
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) {
|