qa: make sure we don't let unspendable Miniscript descriptors be imported

This commit is contained in:
Antoine Poinsot 2023-07-01 12:06:47 +02:00
parent 639e3b6c97
commit a49402a9ec
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304

View File

@ -277,6 +277,18 @@ class WalletMiniscriptTest(BitcoinTestFramework):
assert not res["success"]
assert "is not sane: witnesses without signature exist" in res["error"]["message"]
# Sanity check we wouldn't let an unspendable Miniscript descriptor in
res = self.ms_wo_wallet.importdescriptors(
[
{
"desc": descsum_create("wsh(0)"),
"active": False,
"timestamp": "now",
}
]
)[0]
assert not res["success"] and "is not satisfiable" in res["error"]["message"]
# Test we can track any type of Miniscript
for ms in MINISCRIPTS:
self.watchonly_test(ms)