From ed671005654136b728768a423c8ac7f4e1ce637f Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 23 Apr 2014 08:05:05 +0200 Subject: Add required locks in tests Unit tests with DEBUG_LOCKORDER were running into assertions. --- src/test/script_P2SH_tests.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/test/script_P2SH_tests.cpp') diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp index 03dbdde57..9b1290e0e 100644 --- a/src/test/script_P2SH_tests.cpp +++ b/src/test/script_P2SH_tests.cpp @@ -50,6 +50,7 @@ BOOST_AUTO_TEST_SUITE(script_P2SH_tests) BOOST_AUTO_TEST_CASE(sign) { + LOCK(cs_main); // Pay-to-script-hash looks like this: // scriptSig: // scriptPubKey: HASH160 EQUAL @@ -147,6 +148,7 @@ BOOST_AUTO_TEST_CASE(norecurse) BOOST_AUTO_TEST_CASE(set) { + LOCK(cs_main); // Test the CScript::Set* methods CBasicKeyStore keystore; CKey key[4]; @@ -250,6 +252,7 @@ BOOST_AUTO_TEST_CASE(switchover) BOOST_AUTO_TEST_CASE(AreInputsStandard) { + LOCK(cs_main); CCoinsView coinsDummy; CCoinsViewCache coins(coinsDummy); CBasicKeyStore keystore; -- cgit v1.2.3