Skip to content

Commit

Permalink
fix race condition in core tests when updating sync status field
Browse files Browse the repository at this point in the history
  • Loading branch information
buck54321 committed Nov 12, 2024
1 parent 7111a0d commit 6d5bafb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/core/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3031,7 +3031,9 @@ func trade(t *testing.T, async bool) {

setWalletSyncStatus := func(w *xcWallet, status bool) {
w.mtx.Lock()
w.syncStatus.Synced = status
ss := *w.syncStatus
ss.Synced = status
w.syncStatus = &ss
w.mtx.Unlock()
}

Expand Down

0 comments on commit 6d5bafb

Please sign in to comment.