test: getdescriptorinfo/importdescriptors with whitespace in pubkeys
This commit is contained in:
1 parent
c7afca3d62
commit
a8b548d75d
2 files changed
+21
No files matched your search
@@ -129,6 +129,20 @@ class ImportDescriptorsTest(BitcoinTestFramework):
|
||||
assert_equal(info["ismine"], True)
|
||||
assert_equal(info["ischange"], True)
|
||||
|
||||
self.log.info("Should not import a descriptor with an invalid public key due to whitespace")
|
||||
self.test_importdesc({"desc": descsum_create("pkh( " + key.pubkey + ")"),
|
||||
"timestamp": "now",
|
||||
"internal": True},
|
||||
error_code=-5,
|
||||
error_message=f"pkh(): Key ' {key.pubkey}' is invalid due to whitespace",
|
||||
success=False)
|
||||
self.test_importdesc({"desc": descsum_create("pkh(" + key.pubkey + " )"),
|
||||
"timestamp": "now",
|
||||
"internal": True},
|
||||
error_code=-5,
|
||||
error_message=f"pkh(): Key '{key.pubkey} ' is invalid due to whitespace",
|
||||
success=False)
|
||||
|
||||
# # Test importing of a P2SH-P2WPKH descriptor
|
||||
key = get_generate_key()
|
||||
self.log.info("Should not import a p2sh-p2wpkh descriptor without checksum")
|
||||
|
||||
Reference in new issue
Block a user