Skip to content

Commit

Permalink
feat: hashtree as default hasher
Browse files Browse the repository at this point in the history
  • Loading branch information
twoeths committed Oct 18, 2024
1 parent c7e03b8 commit e0e3173
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/persistent-merkle-tree/src/hasher/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Hasher} from "./types";
import {hasher as nobleHasher} from "./noble";
import {hasher as hashtreeHasher} from "./hashtree";
import type {HashComputationLevel} from "../hashComputation";

export * from "./types";
Expand All @@ -8,7 +8,7 @@ export * from "./util";
/**
* Hasher used across the SSZ codebase, by default, this does not support batch hash.
*/
export let hasher: Hasher = nobleHasher;
export let hasher: Hasher = hashtreeHasher;

/**
* Set the hasher to be used across the SSZ codebase
Expand Down
1 change: 0 additions & 1 deletion packages/ssz/src/type/listUintNum64.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ function forceGetHashComputations(
return;
}

// if (node.h0 === null) {
const hashComputations = levelAtIndex(hcByLevel, index);
const {left, right} = node;
hashComputations.push(left, right, node);
Expand Down

0 comments on commit e0e3173

Please sign in to comment.