There can be implicit wallet unload on GetWallets call site. With this
change concurrent wallet unload is not possible and shared ownership is
not extended to GetWallets's caller scope.
Add and use ForEachWallet #24683
pull promag wants to merge 2 commits into bitcoin:master from promag:2022-03-foreachwallet changing 6 files +41 −24-
promag commented at 11:08 AM on March 26, 2022: member
-
f59959e381
wallet: Prevent wallet unload on GetWalletForJSONRPCRequest
Don't extend shared ownership of all wallets to GetWalletForJSONRPCRequest scope.
-
3ba886d64f
wallet: Add and use ForEachWallet
There can be implicit wallet unload on GetWallets call site. With this change concurrent wallet unload is not possible and shared ownership is not extended to GetWallets's caller scope.
- DrahtBot added the label RPC/REST/ZMQ on Mar 26, 2022
- DrahtBot added the label Wallet on Mar 26, 2022
-
DrahtBot commented at 4:19 PM on March 27, 2022: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #25768 (wallet: Properly rebroadcast unconfirmed transaction chains by achow101)
- #25722 (refactor: Use util::Result class for wallet loading by ryanofsky)
- #18904 (Don't call lsn_reset in periodic flush by bvbfan)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
-
luke-jr commented at 10:32 PM on April 11, 2022: member
I'm not sure this is a good approach. Now WalletContexts is locked during the loop, and ForEachWallet cannot run in parallel.
Perhaps we should consider read-only shared locks?
- DrahtBot added the label Needs rebase on Sep 5, 2022
-
DrahtBot commented at 1:48 PM on September 5, 2022: contributor
<!--cf906140f33d8803c4a75a2196329ecb-->
🐙 This pull request conflicts with the target branch and needs rebase.
<sub>Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".</sub>
- promag closed this on Sep 5, 2022
- promag deleted the branch on Sep 5, 2022
- bitcoin locked this on Sep 5, 2023