aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2017-11-10 11:52:27 -0500
committerMarcoFalke <falke.marco@gmail.com>2017-11-10 11:54:16 -0500
commitee92243e66f2df03b3a759a8ffb75dc06f0cea0d (patch)
treec0c39162e9f995662f5115f471b55c0664aeb144 /src/qt
parent22cdf93c062eeaa0f8f9d6220f01b67240073dfb (diff)
parent109a85899571aa499572e211bb08f05715e8743b (diff)
Merge #11623: tests: Add missing locks to tests
109a85899 tests: Add missing locks to tests (practicalswift) Pull request description: Add missing locks to tests to satisfy lock requirements (such as `EXCLUSIVE_LOCKS_REQUIRED(...)` (Clang Thread Safety Analysis, see #11226), `AssertLockHeld(...)` and implicit lock assumptions). Tree-SHA512: 1aaeb1da89df1779f02fcceff9d2f8ea24a3926d421f9ea305a19be04dd0b3e63d91f6c1ed22fb7e6988343f6a5288829a387ef872cfa7b6add57bd01046b5d9
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/test/wallettests.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp
index 12755d43e4..4289bf5d87 100644
--- a/src/qt/test/wallettests.cpp
+++ b/src/qt/test/wallettests.cpp
@@ -164,7 +164,10 @@ void TestGUI()
wallet.SetAddressBook(test.coinbaseKey.GetPubKey().GetID(), "", "receive");
wallet.AddKeyPubKey(test.coinbaseKey, test.coinbaseKey.GetPubKey());
}
- wallet.ScanForWalletTransactions(chainActive.Genesis(), nullptr, true);
+ {
+ LOCK(cs_main);
+ wallet.ScanForWalletTransactions(chainActive.Genesis(), nullptr, true);
+ }
wallet.SetBroadcastTransactions(true);
// Create widgets for sending coins and listing transactions.