@@ -314,9 +314,19 @@ def run_test(self):
314314 wmulti = self .nodes [2 ].get_wallet_rpc ('wmulti' )
315315
316316 # Create all the addresses
317- p2sh = wmulti .addmultisigaddress (2 , [pubkey0 , pubkey1 , pubkey2 ], label = "" , address_type = "legacy" )["address" ]
318- p2wsh = wmulti .addmultisigaddress (2 , [pubkey0 , pubkey1 , pubkey2 ], label = "" , address_type = "bech32" )["address" ]
319- p2sh_p2wsh = wmulti .addmultisigaddress (2 , [pubkey0 , pubkey1 , pubkey2 ], label = "" , address_type = "p2sh-segwit" )["address" ]
317+ p2sh_ms = wmulti .createmultisig (2 , [pubkey0 , pubkey1 , pubkey2 ], address_type = "legacy" )
318+ p2sh = p2sh_ms ["address" ]
319+ p2wsh_ms = wmulti .createmultisig (2 , [pubkey0 , pubkey1 , pubkey2 ], address_type = "bech32" )
320+ p2wsh = p2wsh_ms ["address" ]
321+ p2sh_p2wsh_ms = wmulti .createmultisig (2 , [pubkey0 , pubkey1 , pubkey2 ], address_type = "p2sh-segwit" )
322+ p2sh_p2wsh = p2sh_p2wsh_ms ["address" ]
323+ import_res = wmulti .importdescriptors (
324+ [
325+ {"desc" : p2sh_ms ["descriptor" ], "timestamp" : "now" },
326+ {"desc" : p2wsh_ms ["descriptor" ], "timestamp" : "now" },
327+ {"desc" : p2sh_p2wsh_ms ["descriptor" ], "timestamp" : "now" },
328+ ])
329+ assert_equal (all ([r ["success" ] for r in import_res ]), True )
320330 p2wpkh = self .nodes [1 ].getnewaddress ("" , "bech32" )
321331 p2pkh = self .nodes [1 ].getnewaddress ("" , "legacy" )
322332 p2sh_p2wpkh = self .nodes [1 ].getnewaddress ("" , "p2sh-segwit" )
0 commit comments