diff --git a/bitcoin/src/blockdata/locktime/absolute.rs b/bitcoin/src/blockdata/locktime/absolute.rs index 34c255f3..ec519c85 100644 --- a/bitcoin/src/blockdata/locktime/absolute.rs +++ b/bitcoin/src/blockdata/locktime/absolute.rs @@ -14,6 +14,9 @@ use core::str::FromStr; use bitcoin_internals::write_err; +#[cfg(all(test, mutate))] +use mutagen::mutate; + use crate::consensus::encode::{self, Decodable, Encodable}; use crate::error::ParseIntError; use crate::io::{self, Read, Write}; @@ -198,6 +201,7 @@ impl LockTime { /// } /// ```` #[inline] + #[cfg_attr(all(test, mutate), mutate)] pub fn is_satisfied_by(&self, height: Height, time: Time) -> bool { use LockTime::*; @@ -226,6 +230,8 @@ impl LockTime { /// let check = LockTime::from_consensus(100 + 1); /// assert!(lock_time.is_implied_by(check)); /// ``` + #[inline] + #[cfg_attr(all(test, mutate), mutate)] pub fn is_implied_by(&self, other: LockTime) -> bool { use LockTime::*; @@ -273,18 +279,21 @@ impl LockTime { impl_parse_str_through_int!(LockTime, from_consensus); impl From for LockTime { + #[inline] fn from(h: Height) -> Self { LockTime::Blocks(h) } } impl From