Skip to content

Conversation

promag
Copy link
Contributor

@promag promag commented Mar 26, 2022

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.

promag added 2 commits March 25, 2022 22:47
Don't extend shared ownership of all wallets to GetWalletForJSONRPCRequest scope.
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.
@promag
Copy link
Contributor Author

promag commented Mar 26, 2022

Same goal as #24678, to avoid calling GetWallets where it is not desirable to extend shared ownership of all loaded wallets.

@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 27, 2022

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

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.

Copy link
Contributor

@shaavan shaavan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

I agree with the reasoning behind this PR. (Here is my detailed review of f59959e)
However, I would like to listen to other contributors' views on the approach before giving this PR an ACK.

@luke-jr
Copy link
Member

luke-jr commented Apr 11, 2022

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
Copy link
Contributor

DrahtBot commented Sep 5, 2022

🐙 This pull request conflicts with the target branch and needs rebase.

Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".

@promag promag closed this Sep 5, 2022
@promag promag deleted the 2022-03-foreachwallet branch September 5, 2022 13:51
@bitcoin bitcoin locked and limited conversation to collaborators Sep 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants