Skip to content

Commit 141ab36

Browse files
twoethsnflaig
andauthored
fix: do not throw error for non-hashtree hashers (#7896)
**Motivation** - do not throw error for as-sha256 hasher, an addition to #7887 **Description** - `log.warn` instead of throwing error may want @KatyaRyazantseva to give it a try on her laptop --------- Co-authored-by: Tuyen Nguyen <twoeths@users.noreply.github.com> Co-authored-by: Nico Flaig <nflaig@protonmail.com>
1 parent d68d593 commit 141ab36

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/beacon-node/src/node/nodejs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export class BeaconNode {
161161
metricsRegistries = [],
162162
}: BeaconNodeInitModules): Promise<T> {
163163
if (hasher.name !== "hashtree") {
164-
throw Error(`Loaded incorrect hasher ${hasher.name}, expected hashtree`);
164+
logger.warn(`hashtree is not supported, using hasher ${hasher.name}`);
165165
}
166166

167167
const controller = new AbortController();

packages/cli/src/cmds/beacon/handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export async function beaconHandler(args: BeaconArgs & GlobalArgs): Promise<void
3838
const {config, options, beaconPaths, network, version, commit, privateKey, logger} = await beaconHandlerInit(args);
3939

4040
if (hasher.name !== "hashtree") {
41-
throw Error(`Loaded incorrect hasher ${hasher.name}, expected hashtree`);
41+
logger.warn(`hashtree is not supported, using hasher ${hasher.name}`);
4242
}
4343

4444
const heapSizeLimit = getHeapStatistics().heap_size_limit;

0 commit comments

Comments
 (0)