nit: By using getdescriptorinfo
, it eliminates the need for descsum_create
, so the test will only use node functions without an additional script for the checksum.
from test_framework.descriptors import descsum_create
can also be removed.
0 multisig = node.get_wallet_rpc(f"{self.name}_{i}")
1
2 external_desc = multisig.getdescriptorinfo(f"wsh(sortedmulti({self.M},{f'/{0}/*,'.join(xpubs)}/{0}/*))")
3 internal_desc = multisig.getdescriptorinfo(f"wsh(sortedmulti({self.M},{f'/{1}/*,'.join(xpubs)}/{1}/*))")
4
5 result = multisig.importdescriptors([
6 { # receiving addresses (internal: False)
7 "desc": external_desc["descriptor"],
8 "active": True,
9 "internal": False,
10 "timestamp": "now",
11 },
12 { # change addresses (internal: True)
13 "desc": internal_desc["descriptor"],