(node: DAGNode, output: NormalizedBlockOutput, duration = 0)
| 319 | } |
| 320 | |
| 321 | private setNodeOutput(node: DAGNode, output: NormalizedBlockOutput, duration = 0): void { |
| 322 | this.state.setBlockOutput(node.id, output, duration) |
| 323 | |
| 324 | const originalBlockId = node.metadata.originalBlockId |
| 325 | const branchIndex = node.metadata.branchIndex |
| 326 | if ( |
| 327 | node.metadata.isParallelBranch && |
| 328 | originalBlockId && |
| 329 | branchIndex !== undefined && |
| 330 | extractOuterBranchIndex(node.id) === undefined |
| 331 | ) { |
| 332 | const globalBranchNodeId = buildBranchNodeId(originalBlockId, branchIndex) |
| 333 | if (globalBranchNodeId !== node.id) { |
| 334 | this.state.setBlockOutput(globalBranchNodeId, output, duration) |
| 335 | } |
| 336 | this.state.setBlockOutput( |
| 337 | buildOuterBranchScopedId(originalBlockId, branchIndex), |
| 338 | output, |
| 339 | duration |
| 340 | ) |
| 341 | } |
| 342 | } |
| 343 | |
| 344 | private findHandler(block: SerializedBlock): BlockHandler | undefined { |
| 345 | return this.blockHandlers.find((h) => h.canHandle(block)) |
no test coverage detected