@leofcoin/chain 1.6.14 → 1.6.16
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 +659 -674
- package/exports/chain.js +3 -1
- package/package.json +1 -1
package/exports/chain.js
CHANGED
|
@@ -804,6 +804,8 @@ class State extends Contract {
|
|
|
804
804
|
await globalThis.accountsStore.clear();
|
|
805
805
|
await globalThis.chainStore.clear();
|
|
806
806
|
await globalThis.blockStore.clear();
|
|
807
|
+
await globalThis.transactionStore.clear();
|
|
808
|
+
await globalThis.stateStore.clear();
|
|
807
809
|
await globalThis.transactionPoolStore.clear();
|
|
808
810
|
}
|
|
809
811
|
#chainStateHandler;
|
|
@@ -1568,7 +1570,7 @@ class Chain extends VersionControl {
|
|
|
1568
1570
|
async #handleTransaction(transaction, latestTransactions, block) {
|
|
1569
1571
|
const hash = await transaction.hash();
|
|
1570
1572
|
const doubleTransactions = [];
|
|
1571
|
-
if (latestTransactions.includes(hash) || transactionStore.has(hash)) {
|
|
1573
|
+
if (latestTransactions.includes(hash) || (await transactionStore.has(hash))) {
|
|
1572
1574
|
doubleTransactions.push(hash);
|
|
1573
1575
|
}
|
|
1574
1576
|
if (doubleTransactions.length > 0) {
|