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).
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-
brunoerg commented at 2:09 PM on January 10, 2025: contributor
-
DrahtBot commented at 2:09 PM on January 10, 2025: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31635.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
- DrahtBot added the label Tests on Jan 10, 2025
-
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:
test 2025-01-10T14:30:30.975000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "/home/runner/work/_temp/test/functional/test_framework/util.py", line 160, in try_rpc fun(*args, **kwds) File "/home/runner/work/_temp/test/functional/test_framework/coverage.py", line 50, in __call__ return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/_temp/test/functional/test_framework/authproxy.py", line 146, in __call__ raise JSONRPCException(response['error'], status) test_framework.authproxy.JSONRPCException: createwalletdescriptor is not available for non-descriptor wallets (-4) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/runner/work/_temp/test/functional/test_framework/test_framework.py", line 135, in main self.run_test() File "/home/runner/work/_temp/ci/scratch/build-x86_64-pc-linux-gnu/test/functional/wallet_address_types.py", line 372, in run_test assert_raises_rpc_error(-5, "Unknown address type 'bech23'", self.nodes[3].createwalletdescriptor, "bech23") File "/home/runner/work/_temp/test/functional/test_framework/util.py", line 151, in assert_raises_rpc_error assert try_rpc(code, message, fun, *args, **kwds), "No exception raised" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/_temp/test/functional/test_framework/util.py", line 164, in try_rpc raise AssertionError("Unexpected JSONRPC error code %i" % e.error["code"]) AssertionError: Unexpected JSONRPC error code -4 test 2025-01-10T14:30:31.007000Z TestFramework (DEBUG): Closing down network thread -
test: add coverage for unknown address type for `createwalletdescriptor` 4da7bfdcc9
- brunoerg force-pushed on Jan 10, 2025
- DrahtBot added the label CI failed on Jan 10, 2025
- DrahtBot removed the label CI failed on Jan 13, 2025
- rkrux approved
-
rkrux commented at 2:38 PM on January 14, 2025: contributor
tACK 4da7bfdcc902f22239e55cd9b90abf36b29edfde
Pretty straightforward change.
-
maflcko commented at 2:44 PM on January 14, 2025: member
lgtm ACK 4da7bfdcc902f22239e55cd9b90abf36b29edfde
-
brunoerg commented at 12:20 PM on January 23, 2025: contributor
rfm?
- fanquake merged this on Jan 23, 2025
- fanquake closed this on Jan 23, 2025
- sedited referenced this in commit e1405325c9 on Feb 3, 2025
- stickies-v referenced this in commit d760fd3dda on Mar 17, 2025
- stickies-v referenced this in commit cc83553352 on Mar 17, 2025
- stickies-v referenced this in commit 2614933f06 on Mar 17, 2025
- stickies-v referenced this in commit b70418c5fc on Mar 17, 2025
- stickies-v referenced this in commit 69f8a1fe50 on Mar 17, 2025
- bug-castercv502 referenced this in commit bf2e6853b0 on Sep 28, 2025
- bitcoin locked this on Jan 23, 2026