We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 80e805c commit ec057e1Copy full SHA for ec057e1
pkg/coordinator/tasks/tx_pool_latency_analysis/task.go
@@ -228,6 +228,11 @@ func (t *Task) Execute(ctx context.Context) error {
228
t.ctx.SetResult(types.TaskResultFailure)
229
return
230
}
231
+ if tx_index < 0 || tx_index >= totNumberOfTxes {
232
+ t.logger.Errorf("Transaction index out of range: %d", tx_index)
233
+ t.ctx.SetResult(types.TaskResultFailure)
234
+ return
235
+ }
236
latenciesMus[tx_index] = time.Since(txStartTime[tx_index]).Microseconds()
237
receivedEvents++
238
0 commit comments