-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: hold wallet shared pointer in CJ Manager/Sessions to prevent concurrent unload #6441
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NACK this solution is over-complex compare to previous approach.
See my clarification there: #6440 (comment)
@@ -138,7 +138,7 @@ class CoinJoinWalletManager { | |||
class CCoinJoinClientSession : public CCoinJoinBaseSession | |||
{ | |||
private: | |||
CWallet& m_wallet; | |||
const std::shared_ptr<CWallet> m_wallet; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively,
if CCoinJoinClientSession and CCoinJoinClientManager is now an owner of CWallet, smart pointer still can be removed from CTransactionBuilder
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, with this PR we actually have guarantee that CWallet won't be freed during any CCoinJoinClientSession and CCoinJoinClientManager operation. Let's do a final touch then: 4f73191 to simplify code a bit further
ef93185
to
2d7c7f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall LGTM 2d7c7f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 2d7c7f8
…sions to prevent concurrent unload 2d7c7f8 fix: do not transfer wallet ownership to CTransactionBuilder{Output} (UdjinM6) 0aeeb85 fix: add missing `AddWallet` call in `TestLoadWallet` (UdjinM6) e800d9d fix: hold wallet shared pointer in CJ Manager/Sessions to prevent concurrent unload (UdjinM6) Pull request description: ## Issue being fixed or feature implemented dashpay#6440 (comment) ## What was done? ## How Has This Been Tested? ## Breaking Changes ## Checklist: - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: PastaPastaPasta: utACK 2d7c7f8 Tree-SHA512: 308e3bed077baa2167b7f9d81b87e5a61a113e4d465706548f303dfc499bc072d4e823e85772e591a879986b0fb0413d5afe0e3995e1f939fa772b29adc0300d
backported in #6447 |
c7b0d80 Merge #6441: fix: hold wallet shared pointer in CJ Manager/Sessions to prevent concurrent unload (pasta) c074e09 Merge #6444: fix: add platform transfer to "most common" filter (pasta) cb04114 Merge #6442: fix: coin selection with `include_unsafe` option should respect `nCoinType` (pasta) db5b53a Merge #6434: fix: early EHF and buried EHF are indistinguish (pasta) Pull request description: ## Issue being fixed or feature implemented See commits; backports for rc.3 ## What was done? ## How Has This Been Tested? built locally ## Breaking Changes ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: kwvg: ACK c7b0d80 UdjinM6: utACK c7b0d80 Tree-SHA512: a64d6503a845ea86df8660d34cdf819c6fefcae5e82035bd8de40152f4f7d894cd1870315b791cca81e6d4db08d9929e4d1de3338a0338478072c9e6bb66952a
43778b0 refactor: pass CWallet reference to CTransactionBuilder (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented Follow-up for #6441 ## What was done? Pass reference to CWallet instead const reference to smart pointer with CWallet to CTransactionBuilder. ## How Has This Been Tested? Run unit/functional tests ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone ACKs for top commit: UdjinM6: utACK 43778b0 PastaPastaPasta: utACK 43778b0 Tree-SHA512: 81451c714ae3fcf695924da1cd578e832ad48fa678dddd67df12a9f4ffcfdfc4522e34977d3e86efc01eb70cfe5359c752c23db0502f1cd9bae2be59587a1c86
1c7bfcb chore: set release true (pasta) c90339e Merge dashpay#6459: docs: add release notes for v22.0.0 (pasta) a6f1fc5 Merge dashpay#6475: chore: bumped chain assumed sizes based on latest usage (pasta) d7cd9f1 Merge dashpay#6464: chore: update man pages for v22 (pasta) 212f91c Merge dashpay#6461: docs: update supported versions in SECURITY.md (pasta) 9a8b685 Merge dashpay#6460: chore: Translations 2024-12 (pasta) 2f71f4d Merge dashpay#6458: chore: bump MIN_MASTERNODE_PROTO_VERSION to latest proto (pasta) fa29ed5 Merge dashpay#6456: fix(qt): allow refreshing wallet data without crashing (pasta) 758cd64 Merge dashpay#6452: fix: store ready queues on the mixing masternode (pasta) 395447b Merge dashpay#6451: depends: update 'src/dashbls' to dashpay/bls-signatures@7e747e8a as 62fa665 (pasta) c7b0d80 Merge dashpay#6441: fix: hold wallet shared pointer in CJ Manager/Sessions to prevent concurrent unload (pasta) c074e09 Merge dashpay#6444: fix: add platform transfer to "most common" filter (pasta) cb04114 Merge dashpay#6442: fix: coin selection with `include_unsafe` option should respect `nCoinType` (pasta) db5b53a Merge dashpay#6434: fix: early EHF and buried EHF are indistinguish (pasta) 8b88ff7 Merge dashpay#6414: chore: bump seeds for v22 (pasta) 02ad523 Merge dashpay#6411: chore: update nMinimumChainWork, defaultAssumeValid, checkpointData, chainTxData for mainnet and testnet (pasta) 3bbcd3d Merge dashpay#6393: docs: mention building for some HOSTs only in `release-process.md` (pasta) 18f636f Merge dashpay#6426: fix: respect SENDDSQUEUE message, move DSQ relay into net processing / peerman (pasta) 9fed456 Merge dashpay#6407: fix: dataraces (pasta) 86105da Merge dashpay#6408: refactor: removed pre-MN_RR logic of validation of CL (pasta) a1f7e96 Merge dashpay#6406: ci: use `actions/cache` to manage depends cache (pasta) 90a3807 Merge dashpay#6402: ci: cache built (pasta) 66f6787 Merge dashpay#6401: ci: deduplicate depends building (pasta) 7ca5663 Merge dashpay#6397: ci: add powerpc64 to GH Guix job matrix (pasta) Pull request description: ## Issue being fixed or feature implemented ## What was done? Suppressed changes from 1c7bfcb and resolved merge conflicts. ``` Auto-merging .github/workflows/build.yml Auto-merging configure.ac Auto-merging src/chainparams.cpp Auto-merging src/coinjoin/client.cpp CONFLICT (content): Merge conflict in src/coinjoin/client.cpp Auto-merging src/coinjoin/client.h CONFLICT (content): Merge conflict in src/coinjoin/client.h Auto-merging src/coinjoin/util.cpp CONFLICT (content): Merge conflict in src/coinjoin/util.cpp Auto-merging src/coinjoin/util.h CONFLICT (content): Merge conflict in src/coinjoin/util.h Auto-merging src/evo/specialtxman.cpp Auto-merging src/init.cpp Auto-merging src/net_processing.cpp CONFLICT (content): Merge conflict in src/net_processing.cpp Auto-merging src/net_processing.h Auto-merging src/qt/transactiontablemodel.cpp Auto-merging src/wallet/wallet.cpp Auto-merging src/wallet/wallet.h CONFLICT (content): Merge conflict in src/wallet/wallet.h Auto-merging test/functional/feature_llmq_chainlocks.py CONFLICT (content): Merge conflict in test/functional/feature_llmq_chainlocks.py ``` ## How Has This Been Tested? ## Breaking Changes ## Checklist: - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: PastaPastaPasta: utACK d108579; no diff to develop Tree-SHA512: 3f063011224880fee35edb04ce265dff33a52273c3d45ef1dbcebcecb22c25d8ad7c91b83514f36142716a6fbd0ddd3a8a3f2a9b59ce78ce975bbce69a2a13b5
Issue being fixed or feature implemented
#6440 (comment)
What was done?
How Has This Been Tested?
Breaking Changes
Checklist: