We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3758509 commit f7079cfCopy full SHA for f7079cf
2 files changed
NBitcoin/Miniscript/Miniscript.cs
@@ -48,6 +48,8 @@ public Miniscript(AstElem astElem)
48
{
49
if (astElem == null)
50
throw new System.ArgumentNullException(nameof(astElem));
51
+ if (!astElem.IsT())
52
+ throw new ArgumentException($"AstElem is not TopLevel expression! AstElem: {astElem}");
53
Policy = astElem.ToPolicy();
54
ast = astElem;
55
}
NBitcoin/Miniscript/MiniscriptScriptParser.cs
@@ -385,6 +385,6 @@ private static P PostProcess(AstElem ast)
385
PAstElemCore.Bind(ast => Parse.Ref(() => PostProcess(ast)));
386
387
public static AstElem ParseScript(Script sc)
388
- => PAstElem.Parse(sc);
+ => PT.Parse(sc);
389
390
0 commit comments