Skip to content

Commit

Permalink
improve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaidashenko committed Nov 26, 2024
1 parent e21d0bd commit 08df3c5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions common/client/transaction_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ func (txSender *TransactionSender[TX, RESULT, CHAIN_ID, RPC]) SendTransaction(ct
healthyNodesNum++
primaryNodeWg.Add(1)
go func(ctx context.Context) {
// Broadcasting transaction and results reporing are background jobs that should be detached from
// callers cancellation
// Broadcasting transaction and results reporting for invariant detection are background jobs that must be detached from
// callers cancellation.
// Results reporting to SendTransaction caller must respect caller's context to avoid goroutine leak.
defer primaryNodeWg.Done()
r := txSender.broadcastTxAsync(ctx, rpc, tx)
select {
Expand Down

0 comments on commit 08df3c5

Please sign in to comment.