Skip to content

Commit

Permalink
Change getPathLessOrEqual to include equal
Browse files Browse the repository at this point in the history
  • Loading branch information
ejMina226 committed Oct 31, 2024
1 parent 2423256 commit c1dc6ee
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class InMemoryLinkedMerkleTreeStorage implements LinkedMerkleTreeStore {
public getPathLessOrEqual(path: number): LinkedLeaf {
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
let largestLeaf = this.getLeaf(0n) as LinkedLeaf;
while (largestLeaf.nextPath < path) {
while (largestLeaf.nextPath <= path) {
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const nextIndex = this.getLeafIndex(largestLeaf.nextPath) as bigint;
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
Expand Down

0 comments on commit c1dc6ee

Please sign in to comment.