@leofcoin/chain 1.8.25 → 1.8.26
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 +7 -4
- package/exports/chain.js +7 -4
- package/package.json +1 -1
package/exports/browser/chain.js
CHANGED
|
@@ -5329,11 +5329,14 @@ class State extends Contract {
|
|
|
5329
5329
|
try {
|
|
5330
5330
|
await this.jobber.add(() => this.#resolveBlock(hash));
|
|
5331
5331
|
this.#resolving = false;
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5332
|
+
try {
|
|
5333
|
+
const lastBlockHash = await globalThis.stateStore.get('lastBlock');
|
|
5334
|
+
if (lastBlockHash === hash) {
|
|
5335
|
+
this.#resolveErrored = false;
|
|
5336
|
+
return;
|
|
5337
|
+
}
|
|
5336
5338
|
}
|
|
5339
|
+
catch (error) { }
|
|
5337
5340
|
if (!this.#blockHashMap.has(this.#lastResolved.previousHash) && this.#lastResolved.previousHash !== '0x0')
|
|
5338
5341
|
return this.resolveBlock(this.#lastResolved.previousHash);
|
|
5339
5342
|
}
|
package/exports/chain.js
CHANGED
|
@@ -1470,11 +1470,14 @@ class State extends Contract {
|
|
|
1470
1470
|
try {
|
|
1471
1471
|
await this.jobber.add(() => this.#resolveBlock(hash));
|
|
1472
1472
|
this.#resolving = false;
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1473
|
+
try {
|
|
1474
|
+
const lastBlockHash = await globalThis.stateStore.get('lastBlock');
|
|
1475
|
+
if (lastBlockHash === hash) {
|
|
1476
|
+
this.#resolveErrored = false;
|
|
1477
|
+
return;
|
|
1478
|
+
}
|
|
1477
1479
|
}
|
|
1480
|
+
catch (error) { }
|
|
1478
1481
|
if (!this.#blockHashMap.has(this.#lastResolved.previousHash) && this.#lastResolved.previousHash !== '0x0')
|
|
1479
1482
|
return this.resolveBlock(this.#lastResolved.previousHash);
|
|
1480
1483
|
}
|