fix(wallet): serialize mixing-only lock state - #7607
Conversation
|
🕓 Ready for review — 12 ahead in queue (commit 956e1e0) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Walkthrough
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score: ⚪ Minimal · up to The change serializes wallet mixing-only lock state reads and transitions and adds focused concurrency coverage; no actionable merge-blocking risk remains after normal checks. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
46dfad3 to
956e1e0
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 956e1e01ed
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
df1ae79 to
956e1e0
Compare
Issue being fixed or feature implemented
CWallet::Lock(true)updated the mixing-only lock flag without holdingcs_wallet, whileUnlock()updated the same flag under the mutex.IsLocked()could also read the flag before acquiring the mutex. Concurrent wallet lock transitions could therefore race and expose an inconsistent lock state.What was done?
fOnlyMixingAllowedwithcs_walletand annotate that invariant.No release note is included because this is an internal synchronization fix with no interface or workflow change.
How Has This Been Tested?
Built on Apple Silicon with the depends toolchain using
--without-gui --disable-bench, then ran:make -j13./src/test/test_dash --run_test=wallet_tests --log_level=messagetest/lint/all-lint.pygit clang-format --diff upstream/develop -- src/wallet/wallet.cpp src/wallet/wallet.hBreaking Changes
None.
Checklist:
This pull request was created by Codex.