Skip to content

Commit

Permalink
miniscript: fix string serialization of and_n
Browse files Browse the repository at this point in the history
We are incorrectly serializing and_n as "and_b".

In master this is fixed by
#722
which rewrites the Display impl completely.
  • Loading branch information
apoelstra committed Sep 1, 2024
1 parent 8f54b5e commit 6401c22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/miniscript/astelem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl<Pk: MiniscriptKey, Ctx: ScriptContext> Terminal<Pk, Ctx> {
Terminal::AndB(ref l, ref r) => fmt_2(f, "and_b(", l, r, is_debug),
Terminal::AndOr(ref a, ref b, ref c) => {
if c.node == Terminal::False {
fmt_2(f, "and_b(", a, b, is_debug)
fmt_2(f, "and_n(", a, b, is_debug)
} else {
f.write_str("andor(")?;
conditional_fmt(f, a, is_debug)?;
Expand Down

0 comments on commit 6401c22

Please sign in to comment.