This change moves CWalletTx::IsTrusted
to CWallet
in order to have TSAN. So now CWallet::IsTrusted
requires cs_wallet
and the recursive lock no longer happens.
Motivated by https://github.com/bitcoin/bitcoin/pull/19289/files#r473308226.
This change moves CWalletTx::IsTrusted
to CWallet
in order to have TSAN. So now CWallet::IsTrusted
requires cs_wallet
and the recursive lock no longer happens.
Motivated by https://github.com/bitcoin/bitcoin/pull/19289/files#r473308226.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
No conflicts as of last run.
1969@@ -1970,37 +1970,38 @@ bool CWalletTx::InMempool() const
1970
1971 bool CWalletTx::IsTrusted() const
1972 {
1973- std::set<uint256> s;
1974- return IsTrusted(s);
1975+ std::set<uint256> trusted_parents;
1976+ LOCK(pwallet->cs_wallet);
1977+ return pwallet->IsTrusted(*this, trusted_parents);
772ea4844c34ad70d02fd0bd6c0945baa8fff85c
0 AssertLockNotHeld(pwallet->cs_wallet);
1 std::set<uint256> trusted_parents;
2 LOCK(pwallet->cs_wallet);
3 return pwallet->IsTrusted(*this, trusted_parents);