rpc: Fix setwalletflag disabling of flags#24855
Merged
fanquake merged 2 commits intobitcoin:masterfrom Apr 16, 2022
Merged
Conversation
Without this, trying to disable a wallet flag results in an Internal bug detected.
Member
|
ACK For context: #24695 |
w0xlt
approved these changes
Apr 16, 2022
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Apr 18, 2022
88376c6 test: Test for disabling wallet flags (Andrew Chow) 17ab31a rpc, wallet: setwalletflags warnings are optional (Andrew Chow) Pull request description: Trying to disable a wallet flag with `setwalletflag` results in `Internal bug detected: 'std::any_of(m_results.m_results.begin(), m_results.m_results.end(), [ret](const RPCResult& res) { return res.MatchesType(ret); })'`. This occurs because the `warnings` field was not marked as optional. This PR makes `warnings` optional to avoid this error. Also added a test case because apparently we didn't already have one. ACKs for top commit: w0xlt: ACK 88376c6 Tree-SHA512: 4f5d3bebf0d022a5ad0f75d70c6562a43c7da6e39e9c3118733327d015c435e2c8d5004fdb039d42407dde5b21231a0f8827623d718abf611a1f06c15af5c806
luke-jr
pushed a commit
to luke-jr/bitcoin
that referenced
this pull request
May 21, 2022
Without this, trying to disable a wallet flag results in an Internal bug detected. Github-Pull: bitcoin#24855 Rebased-From: 17ab31a
luke-jr
pushed a commit
to luke-jr/bitcoin
that referenced
this pull request
May 21, 2022
Github-Pull: bitcoin#24855 Rebased-From: 88376c6
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Trying to disable a wallet flag with
setwalletflagresults inInternal bug detected: 'std::any_of(m_results.m_results.begin(), m_results.m_results.end(), [ret](const RPCResult& res) { return res.MatchesType(ret); })'. This occurs because thewarningsfield was not marked as optional. This PR makeswarningsoptional to avoid this error.Also added a test case because apparently we didn't already have one.