Skip to content

Commit

Permalink
Fix a data race in app tests
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy committed Dec 2, 2021
1 parent 54db1c7 commit bef9931
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ledger/applications_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ import (
)

func commitRound(offset uint64, dbRound basics.Round, l *Ledger) {
l.trackers.mu.Lock()
l.trackers.lastFlushTime = time.Time{}
l.trackers.mu.Unlock()

l.trackers.scheduleCommit(l.Latest(), l.Latest()-(dbRound+basics.Round(offset)))
l.trackers.waitAccountsWriting()
}
Expand Down

0 comments on commit bef9931

Please sign in to comment.