Update auto-generated bindings to latest upstream
[ldk-c-bindings] / lightning-c-bindings / src / lightning / chain / channelmonitor.rs
index 1331506e033bbff55b2809c499c100488221aa48..a5429bcba4a320ae57653cffbe18ea64843e1b1c 100644 (file)
@@ -720,6 +720,15 @@ pub extern "C" fn ChannelMonitor_get_relevant_txids(this_arg: &ChannelMonitor) -
        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.
 ///