aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2023-02-08 17:42:53 -0500
committerAntoine Poinsot <darosior@protonmail.com>2023-02-11 14:12:10 +0100
commit4242c1c52127df3a24be0c15b88d4fc463af04fc (patch)
tree0f28a49730baebd7e83d14fcf62726b8a40a172f
parentf5deb417804b9f267830bd40177677987df4526d (diff)
Align 'e' property of or_d and andor with website spec
-rw-r--r--src/script/miniscript.cpp6
-rw-r--r--src/script/miniscript.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/script/miniscript.cpp b/src/script/miniscript.cpp
index 45aebe909a..12d57f62be 100644
--- a/src/script/miniscript.cpp
+++ b/src/script/miniscript.cpp
@@ -172,8 +172,8 @@ Type ComputeType(Fragment fragment, Type x, Type y, Type z, const std::vector<Ty
(y & "B"_mst).If(x << "Bdu"_mst) | // B=B_y*B_x*d_x*u_x
(x & "o"_mst).If(y << "z"_mst) | // o=o_x*z_y
(x & y & "m"_mst).If(x << "e"_mst && (x | y) << "s"_mst) | // m=m_x*m_y*e_x*(s_x+s_y)
- (x & y & "zes"_mst) | // z=z_x*z_y, e=e_x*e_y, s=s_x*s_y
- (y & "ufd"_mst) | // u=u_y, f=f_y, d=d_y
+ (x & y & "zs"_mst) | // z=z_x*z_y, s=s_x*s_y
+ (y & "ufde"_mst) | // u=u_y, f=f_y, d=d_y, e=e_y
"x"_mst | // x
((x | y) & "ghij"_mst) | // g=g_x+g_y, h=h_x+h_y, i=i_x+i_y, j=j_x+j_y
(x & y & "k"_mst); // k=k_x*k_y
@@ -201,7 +201,7 @@ Type ComputeType(Fragment fragment, Type x, Type y, Type z, const std::vector<Ty
(y & z & "u"_mst) | // u=u_y*u_z
(z & "f"_mst).If((x << "s"_mst) || (y << "f"_mst)) | // f=(s_x+f_y)*f_z
(z & "d"_mst) | // d=d_z
- (x & z & "e"_mst).If(x << "s"_mst || y << "f"_mst) | // e=e_x*e_z*(s_x+f_y)
+ (z & "e"_mst).If(x << "s"_mst || y << "f"_mst) | // e=e_z*(s_x+f_y)
(x & y & z & "m"_mst).If(x << "e"_mst && (x | y | z) << "s"_mst) | // m=m_x*m_y*m_z*e_x*(s_x+s_y+s_z)
(z & (x | y) & "s"_mst) | // s=s_z*(s_x+s_y)
"x"_mst | // x
diff --git a/src/script/miniscript.h b/src/script/miniscript.h
index 80d98f5e66..a3eef7f932 100644
--- a/src/script/miniscript.h
+++ b/src/script/miniscript.h
@@ -1050,9 +1050,9 @@ private:
if (node.GetType() << "f"_mst && ret.nsat.available != Availability::NO) assert(ret.nsat.has_sig);
if (node.GetType() << "s"_mst && ret.sat.available != Availability::NO) assert(ret.sat.has_sig);
- // For 'e' nodes, a non-malleable dissatisfaction must exist.
- if (node.GetType() << "e"_mst) assert(ret.nsat.available != Availability::NO);
- if (node.GetType() << "e"_mst) assert(!ret.nsat.malleable);
+ // For non-malleable 'e' nodes, a non-malleable dissatisfaction must exist.
+ if (node.GetType() << "me"_mst) assert(ret.nsat.available != Availability::NO);
+ if (node.GetType() << "me"_mst) assert(!ret.nsat.malleable);
// For 'm' nodes, if a satisfaction exists, it must be non-malleable.
if (node.GetType() << "m"_mst && ret.sat.available != Availability::NO) assert(!ret.sat.malleable);