fix code for Nim `v1.6.14` compatibility (#5131)

With `v1.6.14` there is compilation issue in `trusted_node_sync` where
a type is not inferred automatically anymore for a `nil` instance.
Fix it so we can bump the compiler.

See https://github.com/status-im/nimbus-build-system/pull/63
This commit is contained in:
Etan Kissling 2023-06-28 19:21:43 +02:00 committed by GitHub
parent 5e1a0eac85
commit 41b93ae57a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -150,7 +150,8 @@ proc doTrustedNodeSync*(
client.getStateV2(StateIdent.init(StateIdentType.Genesis), cfg),
largeRequestsTimeout):
info "Attempt to download genesis state timed out"
nil
# https://github.com/nim-lang/Nim/issues/22180
(ref ForkedHashedBeaconState)(nil)
except CatchableError as exc:
info "Unable to download genesis state",
error = exc.msg, restUrl