Unit test fixes for AssertLockHeld / -DDEBUG_LOCKORDER
Unit tests would fail if compiled with -DDEBUG_LOCKORDER (AssertLockHeld() would fail; AssertLockHeld() relies on the DEBUG_LOCKORDER code to keep track of locks held). Fixed by LOCK'ing the wallet mutex in the unit tests that manipulate the wallet.
This commit is contained in:
@@ -62,6 +62,8 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
|
||||
CoinSet setCoinsRet, setCoinsRet2;
|
||||
int64_t nValueRet;
|
||||
|
||||
LOCK(wallet.cs_wallet);
|
||||
|
||||
// test multiple times to allow for differences in the shuffle order
|
||||
for (int i = 0; i < RUN_TESTS; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user