aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_createmultisig.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/rpc_createmultisig.py')
-rwxr-xr-xtest/functional/rpc_createmultisig.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/rpc_createmultisig.py b/test/functional/rpc_createmultisig.py
index af515f3a27..816ec67492 100755
--- a/test/functional/rpc_createmultisig.py
+++ b/test/functional/rpc_createmultisig.py
@@ -97,6 +97,9 @@ class RpcCreateMultiSigTest(BitcoinTestFramework):
sorted_key_desc = descsum_create('sh(multi(2,{}))'.format(sorted_key_str))
assert_equal(self.nodes[0].deriveaddresses(sorted_key_desc)[0], t['address'])
+ # Check that bech32m is currently not allowed
+ assert_raises_rpc_error(-5, "createmultisig cannot create bech32m multisig addresses", self.nodes[0].createmultisig, 2, self.pub, "bech32m")
+
def check_addmultisigaddress_errors(self):
if self.options.descriptors:
return
@@ -108,6 +111,10 @@ class RpcCreateMultiSigTest(BitcoinTestFramework):
self.nodes[0].importaddress(a)
assert_raises_rpc_error(-5, 'no full public key for address', lambda: self.nodes[0].addmultisigaddress(nrequired=1, keys=addresses))
+ # Bech32m address type is disallowed for legacy wallets
+ pubs = [self.nodes[1].getaddressinfo(addr)["pubkey"] for addr in addresses]
+ assert_raises_rpc_error(-5, "Bech32m multisig addresses cannot be created with legacy wallets", self.nodes[0].addmultisigaddress, 2, pubs, "", "bech32m")
+
def checkbalances(self):
node0, node1, node2 = self.nodes
node0.generate(COINBASE_MATURITY)