From 4c242c44aabc717a44030799cf1b68fd5730c9ff Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Fri, 21 Jun 2024 15:26:11 +0200 Subject: [PATCH] workaround `version-2-0`: `Error: cannot instantiate: 'SomeUnsignedInt'` --- beacon_chain/spec/datatypes/electra.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_chain/spec/datatypes/electra.nim b/beacon_chain/spec/datatypes/electra.nim index a45f0854b..3c2121ffe 100644 --- a/beacon_chain/spec/datatypes/electra.nim +++ b/beacon_chain/spec/datatypes/electra.nim @@ -760,7 +760,7 @@ func is_valid_light_client_header*( # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/electra/light-client/fork.md#normalize_merkle_branch func normalize_merkle_branch*[N]( branch: array[N, Eth2Digest], - gindex: static GeneralizedIndex): array[log2trunc(gindex), Eth2Digest] = + gindex: static GeneralizedIndex): auto = const depth = log2trunc(gindex) var res: array[depth, Eth2Digest] when depth >= branch.len: