mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-06 09:50:55 +02:00
qa: make sure we don't let unspendable Miniscript descriptors be imported
This commit is contained in:
parent
639e3b6c97
commit
a49402a9ec
@ -277,6 +277,18 @@ class WalletMiniscriptTest(BitcoinTestFramework):
|
|||||||
assert not res["success"]
|
assert not res["success"]
|
||||||
assert "is not sane: witnesses without signature exist" in res["error"]["message"]
|
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
|
# Test we can track any type of Miniscript
|
||||||
for ms in MINISCRIPTS:
|
for ms in MINISCRIPTS:
|
||||||
self.watchonly_test(ms)
|
self.watchonly_test(ms)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user