@leofcoin/chain 1.6.7 → 1.6.8

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.
@@ -5073,6 +5073,9 @@ class Chain extends VersionControl {
5073
5073
  // @ts-ignore
5074
5074
  transaction.hash = hash;
5075
5075
  }
5076
+ if (!(await transactionStore.has(hash))) {
5077
+ transactionStore.put(hash, await blockMessage.hash());
5078
+ }
5076
5079
  (await transactionPoolStore.has(hash)) && (await transactionPoolStore.delete(hash));
5077
5080
  return transaction;
5078
5081
  }));
@@ -5279,7 +5282,7 @@ class Chain extends VersionControl {
5279
5282
  const hash = await transaction.hash();
5280
5283
  try {
5281
5284
  const has = await globalThis.transactionPoolStore.has(hash);
5282
- if (!has) {
5285
+ if (!has && !(await transactionStore.has(hash))) {
5283
5286
  await globalThis.transactionPoolStore.put(hash, transaction.encoded);
5284
5287
  }
5285
5288
  if (this.#participating && !this.#runningEpoch)
package/exports/chain.js CHANGED
@@ -1441,6 +1441,9 @@ class Chain extends VersionControl {
1441
1441
  // @ts-ignore
1442
1442
  transaction.hash = hash;
1443
1443
  }
1444
+ if (!(await transactionStore.has(hash))) {
1445
+ transactionStore.put(hash, await blockMessage.hash());
1446
+ }
1444
1447
  (await transactionPoolStore.has(hash)) && (await transactionPoolStore.delete(hash));
1445
1448
  return transaction;
1446
1449
  }));
@@ -1647,7 +1650,7 @@ class Chain extends VersionControl {
1647
1650
  const hash = await transaction.hash();
1648
1651
  try {
1649
1652
  const has = await globalThis.transactionPoolStore.has(hash);
1650
- if (!has) {
1653
+ if (!has && !(await transactionStore.has(hash))) {
1651
1654
  await globalThis.transactionPoolStore.put(hash, transaction.encoded);
1652
1655
  }
1653
1656
  if (this.#participating && !this.#runningEpoch)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/chain",
3
- "version": "1.6.7",
3
+ "version": "1.6.8",
4
4
  "description": "Official javascript implementation",
5
5
  "private": false,
6
6
  "exports": {