diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2017-11-06 23:08:55 +0100 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2017-11-10 17:16:07 +0100 |
commit | 109a85899571aa499572e211bb08f05715e8743b (patch) | |
tree | 0a5db134a775920a176e27e76bcf0f69a07dd214 /src/qt | |
parent | fe503e118f08a9a781d8cc1a6cdde5a615178433 (diff) |
tests: Add missing locks to tests
Add missing locks to tests to satisfy lock requirements (such as
EXCLUSIVE_LOCKS_REQUIRED(...) (Clang Thread Safety Analysis),
AssertLockHeld(...) and implicit lock assumptions).
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/test/wallettests.cpp | 5 |
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. |