Conversation
| IndexBlockTaskParametersSerializer, | ||
| } from "./IndexBlockTaskParameters"; | ||
|
|
||
| export interface IndexBlockResult { |
There was a problem hiding this comment.
So, I think for this we can type it as a union type
{ status: "ok" } | { status: "missing-blocks", missingHeights: .... } if we want.
But I leave it to you if we want to do it that way
| this.indexMissingBlocksTask.name, | ||
| serialized | ||
| ); | ||
| } catch (error) { |
There was a problem hiding this comment.
Let's leave that to the queue implementation to handle errors that come from this. Generally, catching stuff early and not handling it (just emitting it is not handling it imo) lead to weird and non-recoverable behaviour.
Throwing stuff is okay, sometimes stuff just breaks down, but then the sequencer should crash and restart.
At least that's the ideal philosophy I try to approach these things nowadays. Idk I just thought I'd share this - here it's definitely not missing critical so it might be unwise to let the sequencer crash because of a peripherial system. Yeah idk let's talk about it more i guess
| ); | ||
|
|
||
| const filteredBlocks = blocks.filter( | ||
| (block): block is BlockWithResult => block !== undefined |
There was a problem hiding this comment.
there is filterNonUndefined in the common package that we can reuse for this
closes #480