aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_address_types.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/wallet_address_types.py')
-rwxr-xr-xtest/functional/wallet_address_types.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/wallet_address_types.py b/test/functional/wallet_address_types.py
index 6d93cf412f..9b97d08424 100755
--- a/test/functional/wallet_address_types.py
+++ b/test/functional/wallet_address_types.py
@@ -373,5 +373,15 @@ class AddressTypeTest(BitcoinTestFramework):
self.test_address(4, self.nodes[4].getrawchangeaddress(), multisig=False, typ='p2sh-segwit')
self.test_address(4, self.nodes[4].getrawchangeaddress('bech32'), multisig=False, typ='bech32')
+ if self.options.descriptors:
+ self.log.info("Descriptor wallets do not have bech32m addresses by default yet")
+ # TODO: Remove this when they do
+ assert_raises_rpc_error(-12, "Error: No bech32m addresses available", self.nodes[0].getnewaddress, "", "bech32m")
+ assert_raises_rpc_error(-12, "Error: No bech32m addresses available", self.nodes[0].getrawchangeaddress, "bech32m")
+ else:
+ self.log.info("Legacy wallets cannot make bech32m addresses")
+ assert_raises_rpc_error(-8, "Legacy wallets cannot provide bech32m addresses", self.nodes[0].getnewaddress, "", "bech32m")
+ assert_raises_rpc_error(-8, "Legacy wallets cannot provide bech32m addresses", self.nodes[0].getrawchangeaddress, "bech32m")
+
if __name__ == '__main__':
AddressTypeTest().main()