aboutsummaryrefslogtreecommitdiff
path: root/src/qt/test/wallettests.cpp
diff options
context:
space:
mode:
authorpracticalswift <[email protected]>2017-11-06 23:08:55 +0100
committerpracticalswift <[email protected]>2017-11-10 17:16:07 +0100
commit109a85899571aa499572e211bb08f05715e8743b (patch)
tree0a5db134a775920a176e27e76bcf0f69a07dd214 /src/qt/test/wallettests.cpp
parentMerge #11646: Require a steady clock for bench with at least micro precision (diff)
downloaddiscoin-109a85899571aa499572e211bb08f05715e8743b.tar.xz
discoin-109a85899571aa499572e211bb08f05715e8743b.zip
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/test/wallettests.cpp')
-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 12755d43e..4289bf5d8 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.