mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-31 02:31:07 +00:00
Merge bitcoin/bitcoin#34434: miniscript: correct and_v() properties
4fab35cf88c048d2784fe6d71d3f83cc4e420879 miniscript: correct and_v() properties (Antoine Poinsot)
Pull request description:
`and_v()` must never be 'd'. This is not a bug fix since this was unreachable in valid Miniscripts: the first sub of an `and_v()` must be of type V, which conflicts with (i.e. never has) property 'd'.
ACKs for top commit:
sipa:
ACK 4fab35cf88c048d2784fe6d71d3f83cc4e420879. Fuzzed for 2 months worth of CPU time.
achow101:
ACK 4fab35cf88c048d2784fe6d71d3f83cc4e420879
Tree-SHA512: 8932ad2c9188747299cb9147ff097dca8d078ce7bdd0caefa71ee2724ff81d9bef836664211c2081519a45afd50c539974d67c2a3a1a42a65a3b10b1daef8cbe
This commit is contained in:
commit
01651324f4
@ -144,7 +144,7 @@ Type ComputeType(Fragment fragment, Type x, Type y, Type z, const std::vector<Ty
|
||||
(y & "KVB"_mst).If(x << "V"_mst) | // B=V_x*B_y, V=V_x*V_y, K=V_x*K_y
|
||||
(x & "n"_mst) | (y & "n"_mst).If(x << "z"_mst) | // n=n_x+z_x*n_y
|
||||
((x | y) & "o"_mst).If((x | y) << "z"_mst) | // o=o_x*z_y+z_x*o_y
|
||||
(x & y & "dmz"_mst) | // d=d_x*d_y, m=m_x*m_y, z=z_x*z_y
|
||||
(x & y & "mz"_mst) | // m=m_x*m_y, z=z_x*z_y
|
||||
((x | y) & "s"_mst) | // s=s_x+s_y
|
||||
"f"_mst.If((y << "f"_mst) || (x << "s"_mst)) | // f=f_y+s_x
|
||||
(y & "ux"_mst) | // u=u_y, x=x_y
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user