Skip to content

Commit 6f881d8

Browse files
committed
Add unit test for check_timelocks API
Add a unit test that attempts to parse a `concrete::Policy` with both absolute height and time locks. Done in preparation for patching `check_timelocks_helper`.
1 parent 8373269 commit 6f881d8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/policy/concrete.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,4 +1272,11 @@ mod tests {
12721272
let policy = Policy::<String>::from_str("or(and(pk(A),pk(B)),pk(C))").unwrap();
12731273
assert_eq!(policy.num_tap_leaves(), 2);
12741274
}
1275+
1276+
#[test]
1277+
#[should_panic]
1278+
fn check_timelocks() {
1279+
// This implicitly tests the check_timelocks API (has height and time locks).
1280+
let _ = Policy::<String>::from_str("and(after(10),after(500000000))").unwrap();
1281+
}
12751282
}

0 commit comments

Comments
 (0)