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:
parent
d66ee48482
commit
b1490a26ea
|
@ -318,6 +318,12 @@ impl Sequence {
|
||||||
/// BIP-68 relative lock time type flag mask.
|
/// BIP-68 relative lock time type flag mask.
|
||||||
const LOCK_TYPE_MASK: u32 = 0x00400000;
|
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.
|
/// Retuns `true` if the sequence number indicates that the transaction is finalised.
|
||||||
///
|
///
|
||||||
/// The sequence number being equal to 0xffffffff on all txin sequences indicates
|
/// 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.
|
/// Creates a sequence from a u32 value.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn from_consensus(n: u32) -> Self {
|
pub fn from_consensus(n: u32) -> Self {
|
||||||
|
|
Loading…
Reference in New Issue