Module absolute

Source
Available on crate feature alloc only.
Expand description

Provides Height and Time types used by the rust-bitcoin absolute::LockTime type.

Structs§

ConversionError
An error that occurs when converting a u32 to a lock time variant.
Height
An absolute block height, guaranteed to always contain a valid height value.
ParseHeightError
Error returned when parsing block height fails.
ParseTimeError
Error returned when parsing block time fails.
Time
A UNIX timestamp, seconds since epoch, guaranteed to always contain a valid time value.

Constants§

LOCK_TIME_THRESHOLD
The Threshold for deciding whether a lock time value is a height or a time (see Bitcoin Core).

Functions§

is_block_height
Returns true if n is a block height i.e., less than 500,000,000.
is_block_time
Returns true if n is a UNIX timestamp i.e., greater than or equal to 500,000,000.