fee_absolute_to_rate

Function fee_absolute_to_rate 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn fee_absolute_to_rate( fee_absolute: *const c_char, weight: *const c_char, ) -> *mut c_char
Expand description

Converts a given absolute_fee (in sats) to fee rate (in sats/vbyte); given some transaction weight.

  • OUTPUT
 NetworkFee {
   rate: f32,
   absolute: Option<u64>,
 }

ยง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.