mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
miniscript: make 'd:' have the 'u' property under Tapscript context
In Tapscript MINIMALIF is a consensus rule, so we can rely on the fact that the `DUP IF [X] ENDIF` will always put an exact 1 on the stack upon satisfaction.
This commit is contained in:
parent
687a0b0fa5
commit
e5aaa3d77a
3 changed files with 7 additions and 5 deletions
|
|
@ -580,7 +580,7 @@ struct SmartInfo
|
|||
if (subs > 0) subt.push_back(x);
|
||||
if (subs > 1) subt.push_back(y);
|
||||
if (subs > 2) subt.push_back(z);
|
||||
Type res = miniscript::internal::ComputeType(frag, x, y, z, subt, k, data_size, subs, n_keys);
|
||||
Type res = miniscript::internal::ComputeType(frag, x, y, z, subt, k, data_size, subs, n_keys, MsCtx::P2WSH);
|
||||
// Continue if the result is not a valid node.
|
||||
if ((res << "K"_mst) + (res << "V"_mst) + (res << "B"_mst) + (res << "W"_mst) != 1) continue;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue