Skip to main content

get_locktime_type

Function get_locktime_type 

Source
pub fn get_locktime_type(locktime: u32) -> LocktimeType
Expand description

Determine locktime type from value

BIP65/BIP68: If locktime < 500000000, it’s block height; otherwise it’s Unix timestamp.

Contracts express the two complementary classification invariants:

  • below LOCKTIME_THRESHOLD ⟹ BlockHeight
  • at or above LOCKTIME_THRESHOLD ⟹ Timestamp