@leofcoin/chain 1.7.131 → 1.7.133
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 -2
- package/exports/chain.js +2 -2
- package/package.json +1 -1
package/exports/browser/chain.js
CHANGED
|
@@ -4760,7 +4760,7 @@ class State extends Contract {
|
|
|
4760
4760
|
};
|
|
4761
4761
|
this.#knownBlocksHandler = async () => {
|
|
4762
4762
|
return new globalThis.peernet.protos['peernet-response']({
|
|
4763
|
-
response: { blocks:
|
|
4763
|
+
response: { blocks: await globalThis.blockStore.keys() }
|
|
4764
4764
|
});
|
|
4765
4765
|
};
|
|
4766
4766
|
this.#loadBlockTransactions = (transactions) => Promise.all(transactions.map(async (transaction) => new TransactionMessage(await peernet.get(transaction))));
|
|
@@ -5316,7 +5316,7 @@ class State extends Contract {
|
|
|
5316
5316
|
return this.syncChain(latest);
|
|
5317
5317
|
}
|
|
5318
5318
|
async triggerLoad() {
|
|
5319
|
-
if (this.#blocks
|
|
5319
|
+
if (this.#blocks?.length > 0) {
|
|
5320
5320
|
this.#machine = await new Machine(this.#blocks);
|
|
5321
5321
|
}
|
|
5322
5322
|
}
|
package/exports/chain.js
CHANGED
|
@@ -887,7 +887,7 @@ class State extends Contract {
|
|
|
887
887
|
};
|
|
888
888
|
this.#knownBlocksHandler = async () => {
|
|
889
889
|
return new globalThis.peernet.protos['peernet-response']({
|
|
890
|
-
response: { blocks:
|
|
890
|
+
response: { blocks: await globalThis.blockStore.keys() }
|
|
891
891
|
});
|
|
892
892
|
};
|
|
893
893
|
this.#loadBlockTransactions = (transactions) => Promise.all(transactions.map(async (transaction) => new TransactionMessage(await peernet.get(transaction))));
|
|
@@ -1443,7 +1443,7 @@ class State extends Contract {
|
|
|
1443
1443
|
return this.syncChain(latest);
|
|
1444
1444
|
}
|
|
1445
1445
|
async triggerLoad() {
|
|
1446
|
-
if (this.#blocks
|
|
1446
|
+
if (this.#blocks?.length > 0) {
|
|
1447
1447
|
this.#machine = await new Machine(this.#blocks);
|
|
1448
1448
|
}
|
|
1449
1449
|
}
|