diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-07-30 16:16:16 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-07-30 16:18:23 -0400 |
commit | 84d5a6210c9c73c3e03d8b024887553051500b92 (patch) | |
tree | a6f5c51e96c86032e9e6afaa3ee6b1b726e77b46 /src/test/policyestimator_tests.cpp | |
parent | d25079ac7169b119021a06c93a0086aa3c7afc5b (diff) | |
parent | fa5ed4f8d2c4cb3507bcc2460725d483f2e5789c (diff) |
Merge #13786: refactor: Avoid locking tx pool cs thrice
fa5ed4f8d2 refactor: Avoid locking tx pool cs thrice (MarcoFalke)
Pull request description:
`addUnchecked` is (outside the tests) only called by ATMP, which already takes the tx pool read lock. So locking it twice more in both `addUnchecked` methods seems redundant.
Similarly `CalculateMemPoolAncestors` is (beside once in the wallet) only called in contexts, where the tx pool lock is already taken. So remove the lock there as well.
Tree-SHA512: fcf603b570da0fc529fe6db8add218663eae52845510732bee0d4611263d2429d3d3c9c8ae68493d67287d13504500ed51905ccbe711eb15a0af3b019edad543
Diffstat (limited to 'src/test/policyestimator_tests.cpp')
-rw-r--r-- | src/test/policyestimator_tests.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/policyestimator_tests.cpp b/src/test/policyestimator_tests.cpp index 8d288ec993..e45fb6d17e 100644 --- a/src/test/policyestimator_tests.cpp +++ b/src/test/policyestimator_tests.cpp @@ -18,6 +18,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates) { CBlockPolicyEstimator feeEst; CTxMemPool mpool(&feeEst); + LOCK(mpool.cs); TestMemPoolEntryHelper entry; CAmount basefee(2000); CAmount deltaFee(100); |