aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz
diff options
context:
space:
mode:
authorAntoine Poinsot <darosior@protonmail.com>2023-01-21 13:43:15 +0100
committerAntoine Poinsot <darosior@protonmail.com>2023-10-08 02:43:14 +0200
commitc3738d0344f589162b9ffb78b8e2d78f612d3786 (patch)
treecb0bce30295b44be6d99c79e26d3b97439aaebdf /src/test/fuzz
parentbba9340a947446cd1c70852f58dcd8aee35be9ac (diff)
miniscript: introduce a MsContext() helper to contexts
We are going to introduce Tapscript support in Miniscript, for which some of Miniscript rules and properties change (new or modified fragments, different typing rules, different resources consumption, ..).
Diffstat (limited to 'src/test/fuzz')
-rw-r--r--src/test/fuzz/miniscript.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/fuzz/miniscript.cpp b/src/test/fuzz/miniscript.cpp
index 0246507da1..072938bbd2 100644
--- a/src/test/fuzz/miniscript.cpp
+++ b/src/test/fuzz/miniscript.cpp
@@ -128,6 +128,10 @@ struct ParserContext {
if (it == TEST_DATA.dummy_keys_map.end()) return {};
return it->second;
}
+
+ miniscript::MiniscriptContext MsContext() const {
+ return miniscript::MiniscriptContext::P2WSH;
+ }
} PARSER_CTX;
//! Context that implements naive conversion from/to script only, for roundtrip testing.
@@ -172,6 +176,10 @@ struct ScriptParserContext {
key.is_hash = true;
return key;
}
+
+ miniscript::MiniscriptContext MsContext() const {
+ return miniscript::MiniscriptContext::P2WSH;
+ }
} SCRIPT_PARSER_CONTEXT;
//! Context to produce a satisfaction for a Miniscript node using the pre-computed data.