@leofcoin/chain 1.7.125 → 1.7.126

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.
@@ -4890,7 +4890,7 @@ class State extends Contract {
4890
4890
  // Block already exists, check if we need to resolve previous blocks
4891
4891
  const localHash = await globalThis.stateStore.get('lastBlock');
4892
4892
  const previousHash = this.#blocks[index].previousHash;
4893
- if (hash === localHash)
4893
+ if (previousHash === localHash)
4894
4894
  return;
4895
4895
  if (previousHash !== '0x0' && !this.#blocks[this.#blockHashMap.get(previousHash)]) {
4896
4896
  // Previous block not in memory, recursively resolve it
package/exports/chain.js CHANGED
@@ -1017,7 +1017,7 @@ class State extends Contract {
1017
1017
  // Block already exists, check if we need to resolve previous blocks
1018
1018
  const localHash = await globalThis.stateStore.get('lastBlock');
1019
1019
  const previousHash = this.#blocks[index].previousHash;
1020
- if (hash === localHash)
1020
+ if (previousHash === localHash)
1021
1021
  return;
1022
1022
  if (previousHash !== '0x0' && !this.#blocks[this.#blockHashMap.get(previousHash)]) {
1023
1023
  // Previous block not in memory, recursively resolve it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/chain",
3
- "version": "1.7.125",
3
+ "version": "1.7.126",
4
4
  "description": "Official javascript implementation",
5
5
  "private": false,
6
6
  "exports": {