@leofcoin/chain 1.8.26 → 1.8.27

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.
@@ -5286,6 +5286,9 @@ class State extends Contract {
5286
5286
  }
5287
5287
  try {
5288
5288
  const block = await this.getAndPutBlock(hash);
5289
+ if (block.decoded.previousHash !== '0x0' && block.decoded.previousHash !== localHash) {
5290
+ setImmediate(() => this.resolveBlock(block.decoded.previousHash));
5291
+ }
5289
5292
  await Promise.all(block.decoded.transactions
5290
5293
  .filter((hash) => Boolean(hash))
5291
5294
  .map(async (hash) => {
package/exports/chain.js CHANGED
@@ -1427,6 +1427,9 @@ class State extends Contract {
1427
1427
  }
1428
1428
  try {
1429
1429
  const block = await this.getAndPutBlock(hash);
1430
+ if (block.decoded.previousHash !== '0x0' && block.decoded.previousHash !== localHash) {
1431
+ setImmediate(() => this.resolveBlock(block.decoded.previousHash));
1432
+ }
1430
1433
  await Promise.all(block.decoded.transactions
1431
1434
  .filter((hash) => Boolean(hash))
1432
1435
  .map(async (hash) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/chain",
3
- "version": "1.8.26",
3
+ "version": "1.8.27",
4
4
  "description": "Official javascript implementation",
5
5
  "private": false,
6
6
  "exports": {