@leofcoin/chain 1.7.20 → 1.7.22
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 +679 -660
- package/exports/chain.js +6 -4
- package/package.json +1 -1
package/exports/chain.js
CHANGED
|
@@ -1568,9 +1568,9 @@ class Chain extends VersionControl {
|
|
|
1568
1568
|
normalTransactions.push(transaction);
|
|
1569
1569
|
}
|
|
1570
1570
|
for (const transaction of priorityransactions.sort((a, b) => a.decoded.nonce - b.decoded.nonce)) {
|
|
1571
|
-
await this.#handleTransaction(transaction, []
|
|
1571
|
+
await this.#handleTransaction(transaction, []);
|
|
1572
1572
|
}
|
|
1573
|
-
await Promise.all(normalTransactions.map((transaction) => this.#handleTransaction(transaction, []
|
|
1573
|
+
await Promise.all(normalTransactions.map((transaction) => this.#handleTransaction(transaction, [])));
|
|
1574
1574
|
// for (let transaction of transactionsMessages) {
|
|
1575
1575
|
// // await transactionStore.put(transaction.hash, transaction.encoded)
|
|
1576
1576
|
// if (!contracts.includes(transaction.to)) {
|
|
@@ -1642,8 +1642,10 @@ class Chain extends VersionControl {
|
|
|
1642
1642
|
// if (timestamp + this.#slotTime > Date.now()) {
|
|
1643
1643
|
try {
|
|
1644
1644
|
const result = await this.#executeTransaction({ ...transaction.decoded, hash });
|
|
1645
|
-
block
|
|
1646
|
-
|
|
1645
|
+
if (block) {
|
|
1646
|
+
block.transactions.push(hash);
|
|
1647
|
+
block.fees = block.fees.add(await calculateFee(transaction.decoded));
|
|
1648
|
+
}
|
|
1647
1649
|
await globalThis.accountsStore.put(transaction.decoded.from, new TextEncoder().encode(String(transaction.decoded.nonce)));
|
|
1648
1650
|
await transactionStore.put(hash, await transaction.encode());
|
|
1649
1651
|
}
|