eventsourcingdb-merkle 4.0.1 → 4.0.3

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.
@@ -46,10 +46,9 @@ export const generateVersion1Proof = (hashes, targetHash) => {
46
46
  }
47
47
  if (i === currentIndex || i + 1 === currentIndex) {
48
48
  if (currentIndex % 2 === 0) {
49
- // Target is on the left
50
- if (i + 1 < currentLevel.length) {
51
- siblingHashes.push({ hash: right, position: 'right' });
52
- }
49
+ // Target is on the left. Where it has no partner, the tree pairs it
50
+ // with itself, so that it is its own sibling on the right.
51
+ siblingHashes.push({ hash: right, position: 'right' });
53
52
  }
54
53
  else {
55
54
  // Target is on the right
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eventsourcingdb-merkle",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "description": "Merkle tree utilities for EventSourcingDB backups and databases.",
5
5
  "author": {
6
6
  "name": "the native web GmbH",
@@ -17,7 +17,7 @@
17
17
  "commands": "./dist/commands"
18
18
  },
19
19
  "dependencies": {
20
- "@oclif/core": "5.1.2",
20
+ "@oclif/core": "5.1.8",
21
21
  "eventsourcingdb": "2.0.1"
22
22
  },
23
23
  "devDependencies": {