workaround `version-2-0`: `Error: cannot instantiate: 'SomeUnsignedInt'`

This commit is contained in:
Etan Kissling 2024-06-21 15:26:11 +02:00
parent 65ae4d8eb1
commit 4c242c44aa
No known key found for this signature in database
GPG Key ID: B21DA824C5A3D03D
1 changed files with 1 additions and 1 deletions

View File

@ -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: