@leofcoin/chain 1.4.67 → 1.4.69
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 +9 -8
- package/exports/browser/client-04e44411-04e44411.js +41087 -0
- package/exports/browser/{index-adb03c44-fbf4e634.js → index-b5c99174-8b90872e.js} +1 -1
- package/exports/browser/{messages-45c0ed82-b315f125.js → messages-3a71ed04-db6dbd83.js} +1 -1
- package/exports/browser/{node-browser-b370f51f.js → node-browser-e61b575b.js} +8 -8
- package/exports/browser/node-browser.js +1 -1
- package/exports/chain.js +9 -8
- package/package.json +1 -1
- package/exports/browser/client-22e4daf2-3bb20e99.js +0 -9424
package/exports/browser/chain.js
CHANGED
|
@@ -8267,14 +8267,15 @@ class Chain extends Contract {
|
|
|
8267
8267
|
if (!peer.version || peer.version !== this.version)
|
|
8268
8268
|
return;
|
|
8269
8269
|
const lastBlock = await this.#makeRequest(peer, 'lastBlock');
|
|
8270
|
-
if (
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
|
|
8270
|
+
if (Object.keys(lastBlock).length > 0) {
|
|
8271
|
+
if (this.#resolveErrored || lastBlock && lastBlock.index > this.#lastBlock?.index) {
|
|
8272
|
+
// this.#knownBlocks = await this.#makeRequest(peer, 'knownBlocks')
|
|
8273
|
+
this.#resolveErrored = false;
|
|
8274
|
+
if (lastBlock)
|
|
8275
|
+
await this.syncChain(lastBlock);
|
|
8276
|
+
if (await this.hasTransactionToHandle() && !this.#resolveErrored && this.#participating)
|
|
8277
|
+
this.#runEpoch();
|
|
8278
|
+
}
|
|
8278
8279
|
}
|
|
8279
8280
|
}
|
|
8280
8281
|
#epochTimeout;
|