@leofcoin/chain 1.7.90 → 1.7.91

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.
@@ -5026,7 +5026,7 @@ class State extends Contract {
5026
5026
  if (!localBlock || Number(localBlock.index) < Number(lastBlock.index)) {
5027
5027
  // TODO: check if valid
5028
5028
  const localIndex = localBlock ? Number(localBlock.index) : 0;
5029
- const index = lastBlock.index;
5029
+ const index = Number(lastBlock.index);
5030
5030
  await this.resolveBlock(lastBlock.hash);
5031
5031
  console.log('ok');
5032
5032
  let blocksSynced = localIndex > 0 ? (localIndex > index ? localIndex - index + 1 : index + -localIndex + 1) : index + 1;
package/exports/chain.js CHANGED
@@ -1172,7 +1172,7 @@ class State extends Contract {
1172
1172
  if (!localBlock || Number(localBlock.index) < Number(lastBlock.index)) {
1173
1173
  // TODO: check if valid
1174
1174
  const localIndex = localBlock ? Number(localBlock.index) : 0;
1175
- const index = lastBlock.index;
1175
+ const index = Number(lastBlock.index);
1176
1176
  await this.resolveBlock(lastBlock.hash);
1177
1177
  console.log('ok');
1178
1178
  let blocksSynced = localIndex > 0 ? (localIndex > index ? localIndex - index + 1 : index + -localIndex + 1) : index + 1;
@@ -38,7 +38,7 @@ export default class State extends Contract {
38
38
  hash: string;
39
39
  previousHash: string;
40
40
  };
41
- get lastBlockHeight(): 0 | Promise<any>;
41
+ get lastBlockHeight(): Promise<any> | 0;
42
42
  getBlock(index: any): Promise<any>;
43
43
  getBlocks(from?: any, to?: any): Promise<[]>;
44
44
  get totalSize(): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/chain",
3
- "version": "1.7.90",
3
+ "version": "1.7.91",
4
4
  "description": "Official javascript implementation",
5
5
  "private": false,
6
6
  "exports": {