test: add coverage for unknown address type for createwalletdescriptor #31635

pull brunoerg wants to merge 1 commits into bitcoin:master from brunoerg:2025-01-test-wallet-createwalletdescriptor changing 1 files +2 −0
  1. brunoerg commented at 2:09 pm on January 10, 2025: contributor
    Calling createwalletdescriptor RPC with an unknown address type throws an error. This PR adds test coverage for it as done for other RPCs (getnewaddress , getrawchangeaddress, etc).
  2. DrahtBot commented at 2:09 pm on January 10, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31635.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK rkrux, maflcko

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Tests on Jan 10, 2025
  4. fanquake commented at 2:34 pm on January 10, 2025: member

    https://github.com/bitcoin/bitcoin/actions/runs/12711073565/job/35433597593?pr=31635#step:7:44312:

     0 test  2025-01-10T14:30:30.975000Z TestFramework (ERROR): Assertion failed 
     1                                   Traceback (most recent call last):
     2                                     File "/home/runner/work/_temp/test/functional/test_framework/util.py", line 160, in try_rpc
     3                                       fun(*args, **kwds)
     4                                     File "/home/runner/work/_temp/test/functional/test_framework/coverage.py", line 50, in __call__
     5                                       return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
     6                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     7                                     File "/home/runner/work/_temp/test/functional/test_framework/authproxy.py", line 146, in __call__
     8                                       raise JSONRPCException(response['error'], status)
     9                                   test_framework.authproxy.JSONRPCException: createwalletdescriptor is not available for non-descriptor wallets (-4)
    10                                   During handling of the above exception, another exception occurred:
    11                                   Traceback (most recent call last):
    12                                     File "/home/runner/work/_temp/test/functional/test_framework/test_framework.py", line 135, in main
    13                                       self.run_test()
    14                                     File "/home/runner/work/_temp/ci/scratch/build-x86_64-pc-linux-gnu/test/functional/wallet_address_types.py", line 372, in run_test
    15                                       assert_raises_rpc_error(-5, "Unknown address type 'bech23'", self.nodes[3].createwalletdescriptor, "bech23")
    16                                     File "/home/runner/work/_temp/test/functional/test_framework/util.py", line 151, in assert_raises_rpc_error
    17                                       assert try_rpc(code, message, fun, *args, **kwds), "No exception raised"
    18                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    19                                     File "/home/runner/work/_temp/test/functional/test_framework/util.py", line 164, in try_rpc
    20                                       raise AssertionError("Unexpected JSONRPC error code %i" % e.error["code"])
    21                                   AssertionError: Unexpected JSONRPC error code -4
    22 test  2025-01-10T14:30:31.007000Z TestFramework (DEBUG): Closing down network thread
    
  5. test: add coverage for unknown address type for `createwalletdescriptor` 4da7bfdcc9
  6. brunoerg force-pushed on Jan 10, 2025
  7. DrahtBot added the label CI failed on Jan 10, 2025
  8. brunoerg commented at 2:43 pm on January 10, 2025: contributor
    Thanks, @fanquake. Fixed.
  9. DrahtBot removed the label CI failed on Jan 13, 2025
  10. rkrux approved
  11. rkrux commented at 2:38 pm on January 14, 2025: contributor

    tACK 4da7bfdcc902f22239e55cd9b90abf36b29edfde

    Pretty straightforward change.

  12. maflcko commented at 2:44 pm on January 14, 2025: member
    lgtm ACK 4da7bfdcc902f22239e55cd9b90abf36b29edfde
  13. brunoerg commented at 12:20 pm on January 23, 2025: contributor
    rfm?
  14. fanquake merged this on Jan 23, 2025
  15. fanquake closed this on Jan 23, 2025

  16. sedited referenced this in commit e1405325c9 on Feb 3, 2025
  17. stickies-v referenced this in commit d760fd3dda on Mar 17, 2025
  18. stickies-v referenced this in commit cc83553352 on Mar 17, 2025
  19. stickies-v referenced this in commit 2614933f06 on Mar 17, 2025
  20. stickies-v referenced this in commit b70418c5fc on Mar 17, 2025
  21. stickies-v referenced this in commit 69f8a1fe50 on Mar 17, 2025
  22. bug-castercv502 referenced this in commit bf2e6853b0 on Sep 28, 2025
  23. bitcoin locked this on Jan 23, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-02-15 09:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me