diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-05-14 10:29:17 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-05-14 10:29:22 -0400 |
commit | 0264836695a2c260fcc50f25a5e9962098a84647 (patch) | |
tree | bdf51238fd3c20edd6eb821154a68ef5629da99f /src/test | |
parent | 19a3a9e8fba7ad6743ee1a18ee77ab639120d50e (diff) | |
parent | 47782b49e67599585cd766c8322ca01764fe5aa7 (diff) |
Merge #11689: mempool: Fix missing locking in CTxMemPool::check(…) and CTxMemPool::setSanityCheck(…)
47782b49e6 Add Clang thread safety analysis annotations (practicalswift)
0e2dfa8a65 Fix missing locking in CTxMemPool::setSanityCheck(double dFrequency) (practicalswift)
6bc5b7100b Fix missing locking in CTxMemPool::check(const CCoinsViewCache *pcoins) (practicalswift)
Pull request description:
Fix missing locking in `CTxMemPool::check(const CCoinsViewCache *pcoins)`:
* reading variable `mapTx` requires holding mutex `cs`
* reading variable `mapNextTx` requires holding mutex `cs`
* reading variable `nCheckFrequency` requires holding mutex `cs`
Fix missing locking in `CTxMemPool::setSanityCheck(double dFrequency)`:
* writing variable `nCheckFrequency` requires holding mutex `cs`
Tree-SHA512: ce7c365ac89225223fb06e6f469451b121acaa499f35b21ad8a6d2a266c91194639b3703c5428871be033d4f5f7be790cc297bd8c25b2e0c59345ef09c3693d0
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/mempool_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/mempool_tests.cpp b/src/test/mempool_tests.cpp index c4b18151a7..5ca243f42e 100644 --- a/src/test/mempool_tests.cpp +++ b/src/test/mempool_tests.cpp @@ -106,7 +106,7 @@ BOOST_AUTO_TEST_CASE(MempoolRemoveTest) } template<typename name> -static void CheckSort(CTxMemPool &pool, std::vector<std::string> &sortedOrder) +static void CheckSort(CTxMemPool &pool, std::vector<std::string> &sortedOrder) EXCLUSIVE_LOCKS_REQUIRED(pool.cs) { BOOST_CHECK_EQUAL(pool.size(), sortedOrder.size()); typename CTxMemPool::indexed_transaction_set::index<name>::type::iterator it = pool.mapTx.get<name>().begin(); |