From 5173de070e0800ab145c72488530f47671989e0d Mon Sep 17 00:00:00 2001 From: baitcode Date: Fri, 17 Jan 2025 20:10:48 +0300 Subject: [PATCH] fixup --- hash/hash.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hash/hash.go b/hash/hash.go index d0b5ba4f..00f77e2d 100644 --- a/hash/hash.go +++ b/hash/hash.go @@ -245,12 +245,11 @@ func CompiledClassHash(casmClass contracts.CasmClass) *felt.Felt { L1HandleHash := hashCasmClassEntryPointByType(casmClass.EntryPointByType.L1Handler) ConstructorHash := hashCasmClassEntryPointByType(casmClass.EntryPointByType.Constructor) - var ByteCodeHasH *felt.Felt = nil + var ByteCodeHasH *felt.Felt if casmClass.BytecodeSegmentLengths != nil { ByteCodeHasH, _ = hashCasmClassByteCode(casmClass.ByteCode, *casmClass.BytecodeSegmentLengths) - } - if ByteCodeHasH == nil { + } else { ByteCodeHasH = curve.PoseidonArray(casmClass.ByteCode...) }