Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanTinianov committed Oct 18, 2024
1 parent b22f85f commit 6b87b56
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/solana/client/multinode/transaction_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,17 @@ func (txSender *TransactionSender[TX, RESULT, CHAIN_ID, RPC]) SendTransaction(ct
primaryNodeWg.Add(1)
go func() {
defer primaryNodeWg.Done()
result := txSender.broadcastTxAsync(ctx, rpc, tx)
r := txSender.broadcastTxAsync(ctx, rpc, tx)
select {
case <-ctx.Done():
return
case txResults <- result:
case txResults <- r:
}

select {
case <-ctx.Done():
return
case txResultsToReport <- result:
case txResultsToReport <- r:
}
}()
})
Expand Down Expand Up @@ -216,10 +216,10 @@ loop:
case <-ctx.Done():
txSender.lggr.Debugw("Failed to collect of the results before context was done", "tx", tx, "errorsByCode", errorsByCode)
return result, ctx.Err()
case result := <-txResults:
errorsByCode[result.Code()] = append(errorsByCode[result.Code()], result)
case r := <-txResults:
errorsByCode[r.Code()] = append(errorsByCode[r.Code()], r)
resultsCount++
if slices.Contains(sendTxSuccessfulCodes, result.Code()) || resultsCount >= requiredResults {
if slices.Contains(sendTxSuccessfulCodes, r.Code()) || resultsCount >= requiredResults {
break loop
}
case <-softTimeoutChan:
Expand Down

0 comments on commit 6b87b56

Please sign in to comment.