Move enables_absolute_lock_time method

In preparation for deprecating the `is_final` method; move the
`enables_absolute_lock_time` method to be directly above the `is_final`
method.

Refactor only, no logic changes.
This commit is contained in:
Tobin C. Harding 2023-01-22 17:04:58 +11:00
parent d66ee48482
commit b1490a26ea
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 6 additions and 6 deletions

View File

@ -318,6 +318,12 @@ impl Sequence {
/// BIP-68 relative lock time type flag mask.
const LOCK_TYPE_MASK: u32 = 0x00400000;
/// Returns `true` if the sequence number enables absolute lock-time ([`Transaction::lock_time`]).
#[inline]
pub fn enables_absolute_lock_time(&self) -> bool {
!self.is_final()
}
/// Retuns `true` if the sequence number indicates that the transaction is finalised.
///
/// The sequence number being equal to 0xffffffff on all txin sequences indicates
@ -394,12 +400,6 @@ impl Sequence {
}
}
/// Returns `true` if the sequence number enables absolute lock-time ([`Transaction::lock_time`]).
#[inline]
pub fn enables_absolute_lock_time(&self) -> bool {
!self.is_final()
}
/// Creates a sequence from a u32 value.
#[inline]
pub fn from_consensus(n: u32) -> Self {