local_ret.into()
}
+/// Gets the latest best block which was connected either via the [`chain::Listen`] or
+/// [`chain::Confirm`] interfaces.
+#[must_use]
+#[no_mangle]
+pub extern "C" fn ChannelMonitor_current_best_block(this_arg: &ChannelMonitor) -> crate::lightning::chain::BestBlock {
+ let mut ret = unsafe { &*this_arg.inner }.current_best_block();
+ crate::lightning::chain::BestBlock { inner: Box::into_raw(Box::new(ret)), is_owned: true }
+}
+
/// `Persist` defines behavior for persisting channel monitors: this could mean
/// writing once to disk, and/or uploading to one or more backup services.
///
/// Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
pub free: Option<extern "C" fn(this_arg: *mut c_void)>,
}
+unsafe impl Send for Persist {}
+unsafe impl Sync for Persist {}
+#[no_mangle]
+pub(crate) extern "C" fn Persist_clone_fields(orig: &Persist) -> Persist {
+ Persist {
+ this_arg: orig.this_arg,
+ persist_new_channel: Clone::clone(&orig.persist_new_channel),
+ update_persisted_channel: Clone::clone(&orig.update_persisted_channel),
+ free: Clone::clone(&orig.free),
+ }
+}
use lightning::chain::channelmonitor::Persist as rustPersist;
impl rustPersist<crate::lightning::chain::keysinterface::Sign> for Persist {