From 6d5bafbc8454db0ed6cd0c5a6fff6330b96bb628 Mon Sep 17 00:00:00 2001 From: Brian Stafford Date: Mon, 11 Nov 2024 18:25:55 -0600 Subject: [PATCH] fix race condition in core tests when updating sync status field --- client/core/core_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/core/core_test.go b/client/core/core_test.go index d470d38b54..5bdacecb94 100644 --- a/client/core/core_test.go +++ b/client/core/core_test.go @@ -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() }