diff --git a/src/lib/provable/packed.ts b/src/lib/provable/packed.ts index 6bf7d86908..401416161d 100644 --- a/src/lib/provable/packed.ts +++ b/src/lib/provable/packed.ts @@ -186,19 +186,18 @@ class Hashed { } { let _hash = hash ?? ((t: T) => Poseidon.hashPacked(type, t)); - let dummyHash = _hash(type.empty()); - return class Hashed_ extends Hashed { static _innerProvable = type; static _provable = provableFromClass(Hashed_, { - hash: modifiedField({ empty: () => dummyHash }), + hash: modifiedField({ empty: () => _hash(type.empty()) }), value: Unconstrained.provable, }) as ProvableHashable>; static _hash = _hash satisfies (t: T) => Field; static empty(): Hashed { - return new this(dummyHash, Unconstrained.from(type.empty())); + let empty = type.empty(); + return new this(_hash(empty), Unconstrained.from(empty)); } static get provable() {