1089 | @@ -1090,8 +1090,9 @@ uint64_t CTxMemPool::CalculateDescendantMaximum(txiter entry) const {
1090 | return maximum;
1091 | }
1092 |
1093 | -void CTxMemPool::GetTransactionAncestry(const uint256& txid, size_t& ancestors, size_t& descendants) const {
1094 | - LOCK(cs);
1095 | +void CTxMemPool::GetTransactionAncestry(const uint256& txid, size_t& ancestors, size_t& descendants) const
1096 | +{
1097 | + AssertLockHeld(cs);
Again, I don't think this change is necessary. GetTransactionAncestry() is only called with the lock held in the tests, which can be updated.
Right, I also saw that. I guess @hebasto preferred this approach because the changes to tests would be too big and ugly? (if we mandate that GetTransactionAncestry() will lock the mutex itself and the callers should not be holding it)