What changed, and why it matters
This commit only deletes an incorrect explanatory comment. The actual code behavior does not change at all. It is a documentation cleanup, not a security fix.
No action needed; this is a non-functional documentation-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch removes a six-line inline comment in units/src/locktime/absolute/mod.rs that incorrectly described the median-time-past comparison in MedianTimePast::is_satisfied_by. The function body remains self < time, identical to the pre-patch version. The commit message explains that the comment contradicted the rustdoc and Bitcoin Core’s IsFinalTx logic, and that the < operator is correct per BIP-113. No code logic is modified.
Changed components
units/src/locktime/absolute/mod.rsInspect captured patch +1 / −6
diff --git a/units/src/locktime/absolute/mod.rs b/units/src/locktime/absolute/mod.rs
index f152005a..93575516 100644
--- a/units/src/locktime/absolute/mod.rs
+++ b/units/src/locktime/absolute/mod.rs
@@ -694,12 +694,7 @@ impl MedianTimePast {
/// the chain tip then a transaction with this lock can be broadcast for inclusion in the next
/// block.
#[inline]
- pub fn is_satisfied_by(self, time: Self) -> bool {
- // The locktime check in Core during block validation uses the MTP
- // of the previous block - which is expected to be `time` here.
- // This requires a strict less-than comparison (`<`) per BIP-113.
- self < time
- }
+ pub fn is_satisfied_by(self, time: Self) -> bool { self < time }
}
crate::internal_macros::impl_fmt_traits_for_u32_wrapper!(MedianTimePast);
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.