Remove mention of packed
We removed the `PackedLockTime`, remove all mentions of the word packed.
This commit is contained in:
parent
d85817b880
commit
026537807f
|
@ -330,8 +330,8 @@ impl FromHexStr for LockTime {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn from_hex_str_no_prefix<S: AsRef<str> + Into<String>>(s: S) -> Result<Self, Self::Error> {
|
fn from_hex_str_no_prefix<S: AsRef<str> + Into<String>>(s: S) -> Result<Self, Self::Error> {
|
||||||
let packed_lock_time = crate::parse::hex_u32(s)?;
|
let lock_time = crate::parse::hex_u32(s)?;
|
||||||
Ok(Self::from_consensus(packed_lock_time))
|
Ok(Self::from_consensus(lock_time))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -840,20 +840,20 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn packed_lock_time_from_str_hex_happy_path() {
|
fn lock_time_from_str_hex_happy_path() {
|
||||||
let actual = LockTime::from_hex_str("0xBA70D").unwrap();
|
let actual = LockTime::from_hex_str("0xBA70D").unwrap();
|
||||||
let expected = LockTime::from_consensus(0xBA70D);
|
let expected = LockTime::from_consensus(0xBA70D);
|
||||||
assert_eq!(actual, expected);
|
assert_eq!(actual, expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn packed_lock_time_from_str_hex_no_prefix_happy_path() {
|
fn lock_time_from_str_hex_no_prefix_happy_path() {
|
||||||
let lock_time = LockTime::from_hex_str_no_prefix("BA70D").unwrap();
|
let lock_time = LockTime::from_hex_str_no_prefix("BA70D").unwrap();
|
||||||
assert_eq!(lock_time, LockTime::from_consensus(0xBA70D));
|
assert_eq!(lock_time, LockTime::from_consensus(0xBA70D));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn packed_lock_time_from_str_hex_invalid_hex_should_ergr() {
|
fn lock_time_from_str_hex_invalid_hex_should_ergr() {
|
||||||
let hex = "0xzb93";
|
let hex = "0xzb93";
|
||||||
let result = LockTime::from_hex_str(hex);
|
let result = LockTime::from_hex_str(hex);
|
||||||
assert!(result.is_err());
|
assert!(result.is_err());
|
||||||
|
|
Loading…
Reference in New Issue