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).
createwalletdescriptor
#31635
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).
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31635.
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.
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
tACK 4da7bfdcc902f22239e55cd9b90abf36b29edfde
Pretty straightforward change.