script/sign: basic signing support for Miniscript descriptors

Try to solve a script using the Miniscript satisfier if the legacy
solver fails under P2WSH context. Only solve public key and public key
hash challenges for now.

We don't entirely replace the raw solver and especially rule out trying to
solve CHECKMULTISIG-based multisigs with the Miniscript satisfier since
some features, such as the transaction input combiner, rely on the
specific behaviour of the former.
This commit is contained in:
Antoine Poinsot
2021-12-01 23:45:33 +01:00
parent 4242c1c521
commit 61c6d1a844
4 changed files with 92 additions and 8 deletions

View File

@@ -1012,7 +1012,7 @@ public:
return false;
}
bool IsSolvable() const override { return false; } // For now, mark these descriptors as non-solvable (as we don't have signing logic for them).
bool IsSolvable() const override { return true; }
bool IsSingleType() const final { return true; }
};