Add required locks in tests

Unit tests with DEBUG_LOCKORDER were running into assertions.
This commit is contained in:
Wladimir J. van der Laan
2014-04-23 08:05:05 +02:00
parent bbe53f61db
commit ed67100565
3 changed files with 5 additions and 1 deletions

View File

@@ -65,7 +65,7 @@ BOOST_AUTO_TEST_CASE(rpc_wallet)
// Test RPC calls for various wallet statistics
Value r;
LOCK(pwalletMain->cs_wallet);
LOCK2(cs_main, pwalletMain->cs_wallet);
BOOST_CHECK_NO_THROW(CallRPC("listunspent"));
BOOST_CHECK_THROW(CallRPC("listunspent string"), runtime_error);