Skip to content

Commit a49402a

Browse files
committed
qa: make sure we don't let unspendable Miniscript descriptors be imported
1 parent 639e3b6 commit a49402a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/functional/wallet_miniscript.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,18 @@ def run_test(self):
277277
assert not res["success"]
278278
assert "is not sane: witnesses without signature exist" in res["error"]["message"]
279279

280+
# Sanity check we wouldn't let an unspendable Miniscript descriptor in
281+
res = self.ms_wo_wallet.importdescriptors(
282+
[
283+
{
284+
"desc": descsum_create("wsh(0)"),
285+
"active": False,
286+
"timestamp": "now",
287+
}
288+
]
289+
)[0]
290+
assert not res["success"] and "is not satisfiable" in res["error"]["message"]
291+
280292
# Test we can track any type of Miniscript
281293
for ms in MINISCRIPTS:
282294
self.watchonly_test(ms)

0 commit comments

Comments
 (0)