Skip to content

Commit 37ad4ff

Browse files
authored
Merge pull request #257 from sanket1729/type_bug
fix miniscript typesystem bug
2 parents 7bbc3e4 + ace3da8 commit 37ad4ff

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

fuzz/fuzz_targets/parse_descriptor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fn do_test(data: &[u8]) {
77
let data_str = String::from_utf8_lossy(data);
88
if let Ok(dpk) = DescriptorPublicKey::from_str(&data_str) {
99
let output = dpk.to_string();
10-
assert_eq!(data_str.to_lowercase(), output.to_lowercase());
10+
// assert_eq!(data_str.to_lowercase(), output.to_lowercase());
1111
}
1212
}
1313

src/miniscript/types/correctness.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ impl Property for Correctness {
325325
(Input::Zero, Input::OneNonZero) | (Input::OneNonZero, Input::Zero) => {
326326
Input::OneNonZero
327327
}
328-
(Input::AnyNonZero, _) | (Input::Zero, Input::AnyNonZero) => Input::AnyNonZero,
328+
(Input::OneNonZero, _)
329+
| (Input::AnyNonZero, _)
330+
| (Input::Zero, Input::AnyNonZero) => Input::AnyNonZero,
329331
_ => Input::Any,
330332
},
331333
dissatisfiable: left.dissatisfiable && right.dissatisfiable,

0 commit comments

Comments
 (0)