HomePhabricator

wallet, refactor: Immutable CWalletTx::pwallet

Description

wallet, refactor: Immutable CWalletTx::pwallet

Summary:
PR description:

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.

This is a backport of core#19773 [1/2]
https://github.com/bitcoin/bitcoin/pull/19773/commits/819f10f6718659eeeec13af2ce831df3a0984090

Depends on D10097

Test Plan:
With TSAN:
ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10099

Details

Provenance
João Barbosa <joao.paulo.barbosa@gmail.com>Authored on Aug 21 2020, 00:05
PiRKCommitted on Sep 14 2021, 06:27
PiRKPushed on Sep 14 2021, 06:27
Reviewer
Restricted Project
Differential Revision
D10099: wallet, refactor: Immutable CWalletTx::pwallet
Parents
rABCc0a3007e5e02: wallet: IsChange requires cs_wallet lock
Branches
Unknown
Tags
Unknown