Skip to content

Commit 501db33

Browse files
fix(tx_pool_throughput_analysis): return early if context is canceled during transaction generation
1 parent 349a070 commit 501db33

File tree

1 file changed

+4
-0
lines changed
  • pkg/coordinator/tasks/tx_pool_throughput_analysis

1 file changed

+4
-0
lines changed

pkg/coordinator/tasks/tx_pool_throughput_analysis/task.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ func (t *Task) Execute(ctx context.Context) error {
129129

130130
// generate and sign tx
131131
go func() {
132+
if ctx.Err() != nil {
133+
return;
134+
}
135+
132136
tx, err := t.generateTransaction(ctx)
133137
if err != nil {
134138
t.logger.Errorf("Failed to create transaction: %v", err)

0 commit comments

Comments
 (0)