Skip to content

Commit

Permalink
Improve slow block validation mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
felixbrucker committed Jan 17, 2024
1 parent e9b9488 commit 4836b47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/analyzer/slow-block-validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ export function analyzeForSlowBlockValidation(warningLogLines: LogLine[]): SlowB
percentFull: matches.length === 5 ? parseFloat(matches[4]) : undefined,
}
})
.filter((warning): warning is BlockValidationWarning => warning !== undefined && warning.blockValidationTimeInSeconds >= 4)
.filter((warning): warning is BlockValidationWarning => warning !== undefined)

if (blockValidationWarnings.length === 0) {
const slowBlockValidationWarnings = blockValidationWarnings.filter(warning => warning.blockValidationTimeInSeconds >= 4)
if (slowBlockValidationWarnings.length === 0) {
return { isSlow: false }
}

Expand Down

0 comments on commit 4836b47

Please sign in to comment.