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 Aug 31, 2024
1 parent 8f54b5e commit 98ea9df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# # 12.3.0 - August 31, 2024

- Fix incorrect string serialization of `and_b` [#735](https://github.com/rust-bitcoin/rust-miniscript/pull/735)

# # 12.2.0 - July 20, 2024

- Fix panics while decoding large miniscripts from script [#712](https://github.com/rust-bitcoin/rust-miniscript/pull/712)
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "miniscript"
version = "12.2.0"
version = "12.3.0"
authors = ["Andrew Poelstra <[email protected]>, Sanket Kanjalkar <[email protected]>"]
license = "CC0-1.0"
homepage = "https://github.com/rust-bitcoin/rust-miniscript/"
Expand Down
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 98ea9df

Please sign in to comment.