Skip to content

Conversation

@achow101
Copy link
Member

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.

Without this, trying to disable a wallet flag results in an Internal bug
detected.
@maflcko maflcko added this to the 24.0 milestone Apr 15, 2022
@maflcko
Copy link
Member

maflcko commented Apr 15, 2022

ACK

For context: #24695

Copy link
Contributor

@w0xlt w0xlt left a comment

Choose a reason for hiding this comment

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

ACK 88376c6

Copy link

@nina1234 nina1234 left a comment

Choose a reason for hiding this comment

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

Hi

@fanquake fanquake merged commit d1b3dfb into bitcoin:master 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
@bitcoin bitcoin locked and limited conversation to collaborators Apr 16, 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.

5 participants