Rename `day_` variables to `time_`

To be consistent with similar lock height test function rename
`day_after/before` to `time_after/before` and change the same `time` to
`time_same`.
This commit is contained in:
Jamil Lambert, PhD 2025-01-24 15:49:57 +00:00
parent 922392268f
commit bc8a378187
No known key found for this signature in database
GPG Key ID: 54DC29234AB5D2C0
1 changed files with 6 additions and 6 deletions

View File

@ -485,15 +485,15 @@ mod tests {
fn satisfied_by_time() { fn satisfied_by_time() {
let lock_by_time = LockTime::from_consensus(1653195600); // May 22nd 2022, 5am UTC. let lock_by_time = LockTime::from_consensus(1653195600); // May 22nd 2022, 5am UTC.
let time = Time::from_consensus(1653195600).expect("May 22nd 2022, 5am UTC"); let time_same = Time::from_consensus(1653195600).expect("May 22nd 2022, 5am UTC");
let day_after = Time::from_consensus(1653282000).expect("May 23rd 2022, 5am UTC"); let time_after = Time::from_consensus(1653282000).expect("May 23rd 2022, 5am UTC");
let day_before = Time::from_consensus(1653109200).expect("May 21th 2022, 5am UTC"); let time_before = Time::from_consensus(1653109200).expect("May 21th 2022, 5am UTC");
let height = Height::from_consensus(800_000).expect("failed to parse height"); let height = Height::from_consensus(800_000).expect("failed to parse height");
assert!(lock_by_time.is_satisfied_by(height, time)); assert!(lock_by_time.is_satisfied_by(height, time_same));
assert!(lock_by_time.is_satisfied_by(height, day_after)); assert!(lock_by_time.is_satisfied_by(height, time_after));
assert!(!lock_by_time.is_satisfied_by(height, day_before)); assert!(!lock_by_time.is_satisfied_by(height, time_before));
} }