[BUG] Fix crash when sending shield notes from the GUI with coin control#2327
Merged
random-zebra merged 5 commits intoApr 23, 2021
Merged
Conversation
Simple test to trigger an assertion failure. Can be enriched in the future, to check for various configurations.
Remove some code duplication
needed by CWalletTx::GetDepthInMainChain
This was referenced Apr 22, 2021
Fuzzbawls
approved these changes
Apr 23, 2021
Fuzzbawls
added a commit
that referenced
this pull request
Apr 24, 2021
68b91b1 [Refactoring] Don't compute depth multiple times in GetFilteredNotes (random-zebra) 9bec9bc [BUG] Missing cs_wallet lock in SaplingScriptPubKeyMan::GetNotes (random-zebra) b2d9061 [Trivial] Pass big args by const-reference for notes decryption (random-zebra) 7d75415 [Refactoring] Use CWalletTx::DecryptSaplingNote in Get[Filtered]Notes (random-zebra) 310db82 [Tests] Add basic unit-test for SaplingScriptPubKeyMan::GetNotes (random-zebra) 1886dda [GUI] Fix Cold Staking address list (Fuzzbawls) Pull request description: Backport the following bug fixes PRs to the 5.1 branch: #2321 #2327 After having this one and #2333 merged, we are good to go with the final v5.1.0 production release. ACKs for top commit: random-zebra: utACK 68b91b1 Fuzzbawls: utACK 68b91b1 Tree-SHA512: 794e0845c27e9fc976fdf18fc0d6baceb6867aab89ab58100119b909b908763eeb0af6a4ef6f3befcf4dc2f13b885bab1c66639bd7e3e7153eefee8969c3e50d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This particular flow calls
SaplingScriptPubKeyMan::GetNotes(instead ofGetFilteredNotes), which callsCWalletTx::GetDepthInMainChainwithout holdingcs_wallet(requirement introduced viaAssertLockHeldin 1386ab7).Add a simple unittest to cover
GetNotes/GetFilteredNotes, do a bit of refactoring (removing some code duplication), and fix the missing lock.