@leofcoin/chain 1.7.16 → 1.7.17

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.
@@ -4568,6 +4568,15 @@ class State extends Contract {
4568
4568
  }
4569
4569
  try {
4570
4570
  const block = await this.getAndPutBlock(hash);
4571
+ await Promise.all(block.decoded.transactions.map(async (hash) => {
4572
+ // should be in a transaction store already
4573
+ if (!(await transactionStore.has(hash))) {
4574
+ const data = await peernet.get(hash, 'transaction');
4575
+ await transactionStore.put(hash, data);
4576
+ }
4577
+ ;
4578
+ (await transactionPoolStore.has(hash)) && (await transactionPoolStore.delete(hash));
4579
+ }));
4571
4580
  index = block.decoded.index;
4572
4581
  const size = block.encoded.length > 0 ? block.encoded.length : block.encoded.byteLength;
4573
4582
  this.#totalSize += size;
package/exports/chain.js CHANGED
@@ -935,6 +935,15 @@ class State extends Contract {
935
935
  }
936
936
  try {
937
937
  const block = await this.getAndPutBlock(hash);
938
+ await Promise.all(block.decoded.transactions.map(async (hash) => {
939
+ // should be in a transaction store already
940
+ if (!(await transactionStore.has(hash))) {
941
+ const data = await peernet.get(hash, 'transaction');
942
+ await transactionStore.put(hash, data);
943
+ }
944
+ ;
945
+ (await transactionPoolStore.has(hash)) && (await transactionPoolStore.delete(hash));
946
+ }));
938
947
  index = block.decoded.index;
939
948
  const size = block.encoded.length > 0 ? block.encoded.length : block.encoded.byteLength;
940
949
  this.#totalSize += size;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/chain",
3
- "version": "1.7.16",
3
+ "version": "1.7.17",
4
4
  "description": "Official javascript implementation",
5
5
  "private": false,
6
6
  "exports": {