From 08df3c5a5f04760ca81372b7a9bddb6ce0e39a69 Mon Sep 17 00:00:00 2001 From: Dmytro Haidashenko Date: Tue, 26 Nov 2024 17:56:45 +0100 Subject: [PATCH] improve comment --- common/client/transaction_sender.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/client/transaction_sender.go b/common/client/transaction_sender.go index 34063f1a68e..5f58682142f 100644 --- a/common/client/transaction_sender.go +++ b/common/client/transaction_sender.go @@ -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 {