Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_importmulti.py
Show First 20 Lines • Show All 500 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
error_message='Either a descriptor or scriptPubKey must be provided.') | error_message='Either a descriptor or scriptPubKey must be provided.') | ||||
# Test importing of a multisig via descriptor | # Test importing of a multisig via descriptor | ||||
key1 = get_key(self.nodes[0]) | key1 = get_key(self.nodes[0]) | ||||
key2 = get_key(self.nodes[0]) | key2 = get_key(self.nodes[0]) | ||||
self.log.info("Should import a 1-of-2 bare multisig from descriptor") | self.log.info("Should import a 1-of-2 bare multisig from descriptor") | ||||
self.test_importmulti({"desc": "multi(1," + key1.pubkey + "," + key2.pubkey + ")", | self.test_importmulti({"desc": "multi(1," + key1.pubkey + "," + key2.pubkey + ")", | ||||
"timestamp": "now"}, | "timestamp": "now"}, | ||||
success=True, | success=True) | ||||
warnings=["Some private keys are missing, outputs will be considered watchonly. If this is intentional, specify the watchonly flag."]) | |||||
self.log.info( | self.log.info( | ||||
"Should not treat individual keys from the imported bare multisig as watchonly") | "Should not treat individual keys from the imported bare multisig as watchonly") | ||||
test_address(self.nodes[1], | test_address(self.nodes[1], | ||||
key1.p2pkh_addr, | key1.p2pkh_addr, | ||||
ismine=False, | ismine=False, | ||||
iswatchonly=False) | iswatchonly=False) | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
ImportMultiTest().main() | ImportMultiTest().main() |