Commit 200d97f
committed
Merge #22868: wallet: Call load handlers without cs_wallet locked
f13a22a wallet: Call load handlers without cs_wallet locked (João Barbosa)
Pull request description:
Don't have `cs_wallet` locked while calling each `context.wallet_load_fns`. A load handler can always lock `cs_wallet` if needed.
The lock was added in 1c7e25d to satisfy TSAN. With 44c430f most of the code requiring the lock is in `CWallet::AttachChain`. A comment is added to warn about wallets_mutex and cs_wallet lock ordering.
ACKs for top commit:
meshcollider:
re-utACK f13a22a
ryanofsky:
Code review ACK f13a22a. Only change since last review is adding a lock order comment
jonatack:
ACK f13a22a
Tree-SHA512: d51976c3aae4bebc2d1997c88edff712d21fc5523801f5614062a10f826e164579973aeb1981bb1cbc243ecff6af3250362f544c02a79e5d135cbbca1704be623 files changed
+5
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
782 | | - | |
| 782 | + | |
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
789 | | - | |
790 | | - | |
791 | 789 | | |
792 | | - | |
793 | | - | |
794 | 790 | | |
795 | 791 | | |
796 | 792 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2763 | 2763 | | |
2764 | 2764 | | |
2765 | 2765 | | |
2766 | | - | |
2767 | | - | |
2768 | 2766 | | |
2769 | 2767 | | |
2770 | 2768 | | |
| |||
2776 | 2774 | | |
2777 | 2775 | | |
2778 | 2776 | | |
2779 | | - | |
2780 | | - | |
2781 | 2777 | | |
| 2778 | + | |
| 2779 | + | |
2782 | 2780 | | |
2783 | 2781 | | |
2784 | 2782 | | |
| |||
0 commit comments