Skip to content

Commit 601bf77

Browse files
committed
Add failing test case for Segwitv0 x-only compilation
1 parent aa3691d commit 601bf77

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/policy/compiler.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,6 +1648,14 @@ mod tests {
16481648
}
16491649
}
16501650
}
1651+
1652+
#[test]
1653+
fn segwitv0_xonly_pk() {
1654+
let x_only_key = "08c0fcf8895f4361b4fc77afe2ad53b0bd27dcebfd863421b2b246dc283d4103";
1655+
let policy: Concrete<bitcoin::XOnlyPublicKey> = policy_str!("pk({})", x_only_key);
1656+
// Should Err, but currently panics
1657+
policy.compile::<Segwitv0>().unwrap_err();
1658+
}
16511659
}
16521660

16531661
#[cfg(bench)]

0 commit comments

Comments
 (0)