mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-20 03:20:32 +00:00
workaround version-2-0
: Error: cannot instantiate: 'SomeUnsignedInt'
This commit is contained in:
parent
65ae4d8eb1
commit
4c242c44aa
@ -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
|
# 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](
|
func normalize_merkle_branch*[N](
|
||||||
branch: array[N, Eth2Digest],
|
branch: array[N, Eth2Digest],
|
||||||
gindex: static GeneralizedIndex): array[log2trunc(gindex), Eth2Digest] =
|
gindex: static GeneralizedIndex): auto =
|
||||||
const depth = log2trunc(gindex)
|
const depth = log2trunc(gindex)
|
||||||
var res: array[depth, Eth2Digest]
|
var res: array[depth, Eth2Digest]
|
||||||
when depth >= branch.len:
|
when depth >= branch.len:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user