Skip to content

Commit

Permalink
Fix races
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Apr 12, 2022
1 parent 4bb5e37 commit 92f15dd
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ func TestTransactionPreconditionsMinSeq(t *testing.T) {
var wg sync.WaitGroup
wg.Add(len(seqs))
for _, s := range seqs {
sLocal := s
go func() {
txParams = buildTXParams(master, masterAccount, s.seq)
if s.minSeq > 0 {
txParams.Preconditions.MinSequenceNumber = &s.minSeq
params := buildTXParams(master, masterAccount, sLocal.seq)
if sLocal.minSeq > 0 {
params.Preconditions.MinSequenceNumber = &sLocal.minSeq
}
result := itest.MustSubmitTransaction(master, txParams)
result := itest.MustSubmitTransaction(master, params)
resultsMx.Lock()
results = append(results, result)
resultsMx.Unlock()
Expand Down

0 comments on commit 92f15dd

Please sign in to comment.