graph-node icon indicating copy to clipboard operation
graph-node copied to clipboard

cosmos: Do not unwrap an `Option`

Open lutter opened this issue 3 years ago • 2 comments

The code here and here unwraps an Option. That has lead to startup failures in staging. The code needs to be changed to either deal witha None properly (e.g., by returning an empty iterator) or the Block struct needs to be changed to not contain an Option

lutter avatar Jun 05 '22 19:06 lutter

@lutter Do you have more information about these failures (which chain, block number etc.)? This is not a normal situation. We left those unwraps there because we expect the ResultBeginBlock structure to always be present. If it's missing, it might be a data extraction issue.

pienkowb avatar Jun 06 '22 15:06 pienkowb

@pienkowb being a panic, it's actually hard to tell from the logs. If you patch the code to not panic but bubble up an error, then we will be able to pinpoint the subgraph.

leoyvens avatar Jun 06 '22 16:06 leoyvens