#[unsafe(no_mangle)]pub unsafe extern "C" fn days_to_blocks(
days: *const c_char,
) -> *mut c_charExpand description
Convert days to bitcoin blocks as height. Does not consider the current block height. Add to get_height to get the expected block height after the given time in days.
- OUTPUT
BlockHeight {
height: u32,
}ยงSafety
- This function is unsafe because it dereferences and a returns raw pointer.
- ENSURE that result is passed into cstring_free(ptr: *mut c_char) after use.