mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-27 06:47:13 +00:00
f84f320cba
In #5664, `nim-json-rpc` dependency got bumped which included a change in behaviour when processing `null` data for heap allocated objects. - https://github.com/status-im/nim-json-rpc/pull/176 Old behaviour was to raise an exception, while new behaviour is to set the value to `nil` but treat it as a successful parse. Old exceptions were similar to "Parameter [result] expected JObject but got JNull". As part of the `nim-json-rpc` bump in #5664, `el_manager.nim` was not updated to match the new behaviour, leading to crash whenever its logic assumes that a successfully parsed web3 `BlockObject` (heap allocated) may be assumed to be non-`nil`. As a quick remedy, the `el_manager.nim` is updated to transform `nil` responses for `BlockObject` into `ValueError`, allowing reuse of the existing and tested exception based processing.