fix light client topic subscriptions (#6351)
Using `let contextFork = consensusFork` no longer seems to work to avoid capturing the `var` loop variable; it ends up being `Electra` for all handlers. Use `closureScope` as a more sustainable fix.
This commit is contained in:
parent
81e6fe5045
commit
b6d6247fa1
|
@ -342,8 +342,9 @@ proc installMessageValidators*(
|
||||||
for consensusFork in ConsensusFork:
|
for consensusFork in ConsensusFork:
|
||||||
withLcDataFork(lcDataForkAtConsensusFork(consensusFork)):
|
withLcDataFork(lcDataForkAtConsensusFork(consensusFork)):
|
||||||
when lcDataFork > LightClientDataFork.None:
|
when lcDataFork > LightClientDataFork.None:
|
||||||
|
closureScope:
|
||||||
let
|
let
|
||||||
contextFork = consensusFork # Avoid capturing `Deneb` (Nim 1.6)
|
contextFork = consensusFork
|
||||||
digest = forkDigests[].atConsensusFork(contextFork)
|
digest = forkDigests[].atConsensusFork(contextFork)
|
||||||
|
|
||||||
# light_client_optimistic_update
|
# light_client_optimistic_update
|
||||||
|
|
Loading…
Reference in New Issue