From bfb036756ad6e187fd6d3abfefe5804bb54a5c71 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Tue, 12 Apr 2022 21:18:37 +0200 Subject: [PATCH] Miniscript support in output descriptors Miniscript descriptors are defined under P2WSH context (either `wsh()` or `sh(wsh())`). Only sane Miniscripts are accepted, as insane ones (although valid by type) can have surprising behaviour with regard to malleability guarantees and resources limitations. As Miniscript descriptors are longer and more complex than "legacy" descriptors, care was taken in error reporting to help a user determine for what reason a provided Miniscript is insane. Co-authored-by: Pieter Wuille --- src/script/descriptor.cpp | 262 ++++++++++++++++++++++++++++++---- src/test/descriptor_tests.cpp | 23 +++ 2 files changed, 259 insertions(+), 26 deletions(-) diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp index ca0170c84bb..34a4da74f8b 100644 --- a/src/script/descriptor.cpp +++ b/src/script/descriptor.cpp @@ -6,6 +6,7 @@ #include #include +#include