@hardkas/simulator 0.7.3-alpha → 0.7.4-alpha

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.
Files changed (2) hide show
  1. package/dist/index.js +11 -4
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -65,7 +65,10 @@ function findSelectedParent(parents) {
65
65
  if (parents.length === 0) return void 0;
66
66
  let best = { hash: parents[0].hash, blueWork: parents[0].blueWork };
67
67
  for (let i = 1; i < parents.length; i++) {
68
- const candidate = { hash: parents[i].hash, blueWork: parents[i].blueWork };
68
+ const candidate = {
69
+ hash: parents[i].hash,
70
+ blueWork: parents[i].blueWork
71
+ };
69
72
  if (compareSortableBlocks(candidate, best) > 0) {
70
73
  best = candidate;
71
74
  }
@@ -195,8 +198,8 @@ var ApproxGhostdagEngine = class {
195
198
  }
196
199
  /**
197
200
  * Compute GhostdagData for `block`.
198
- *
199
- * Intentionally non-deterministic for TEMP_INDEXING_HASH as it uses Date.now()
201
+ *
202
+ * Intentionally non-deterministic for TEMP_INDEXING_HASH as it uses Date.now()
200
203
  * for dummy block headers.
201
204
  *
202
205
  * Source: protocol.rs lines 126-166 ghostdag()
@@ -580,7 +583,11 @@ function runAllScenarios(config) {
580
583
  return [
581
584
  runLinearChain({ ...config, name: config.name + ":linear" }),
582
585
  runWideDag({ ...config, name: config.name + ":wide" }),
583
- runForkResolution({ ...config, name: config.name + ":fork", forkPoint: Math.floor(config.blockCount / 2) }),
586
+ runForkResolution({
587
+ ...config,
588
+ name: config.name + ":fork",
589
+ forkPoint: Math.floor(config.blockCount / 2)
590
+ }),
584
591
  runDiamondDag({ ...config, name: config.name + ":diamond" })
585
592
  ];
586
593
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hardkas/simulator",
3
- "version": "0.7.3-alpha",
3
+ "version": "0.7.4-alpha",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -8,8 +8,8 @@
8
8
  ".": "./dist/index.js"
9
9
  },
10
10
  "dependencies": {
11
- "@hardkas/tx-builder": "0.7.3-alpha",
12
- "@hardkas/core": "0.7.3-alpha"
11
+ "@hardkas/tx-builder": "0.7.4-alpha",
12
+ "@hardkas/core": "0.7.4-alpha"
13
13
  },
14
14
  "devDependencies": {
15
15
  "tsup": "^8.3.5",