Skip to content

Commit

Permalink
chore: fix test utility
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain committed Oct 12, 2023
1 parent 3596ab8 commit cf8bd0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/light-client/test/utils/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import bls from "@chainsafe/bls/switchable";
import {PointFormat, PublicKey, SecretKey} from "@chainsafe/bls/types";
import {hash, Tree} from "@chainsafe/persistent-merkle-tree";
import {hasher, Tree} from "@chainsafe/persistent-merkle-tree";
import {BitArray, fromHexString} from "@chainsafe/ssz";
import {BeaconConfig} from "@lodestar/config";
import {
Expand Down Expand Up @@ -235,9 +235,9 @@ export function computeMerkleBranch(
for (let i = 0; i < depth; i++) {
proof[i] = Buffer.alloc(32, i);
if (Math.floor(index / 2 ** i) % 2) {
value = hash(proof[i], value);
value = hasher.digest64(proof[i], value);
} else {
value = hash(value, proof[i]);
value = hasher.digest64(value, proof[i]);
}
}
return {root: value, proof};
Expand Down

0 comments on commit cf8bd0d

Please sign in to comment.