bitcoin = "0.26"
secp256k1 = { version = "0.20.1", features = ["global-context-less-secure"] }
# Note that the following line is matched by genbindings to update the path
-lightning = { git = "https://git.bitcoin.ninja/rust-lightning", rev = "a8038a8234b70bc261f633a9e2b40adebebcd8d4", features = ["allow_wallclock_use"] }
-lightning-persister = { git = "https://git.bitcoin.ninja/rust-lightning", rev = "a8038a8234b70bc261f633a9e2b40adebebcd8d4" }
-lightning-invoice = { git = "https://git.bitcoin.ninja/rust-lightning", rev = "a8038a8234b70bc261f633a9e2b40adebebcd8d4" }
-lightning-background-processor = { git = "https://git.bitcoin.ninja/rust-lightning", rev = "a8038a8234b70bc261f633a9e2b40adebebcd8d4" }
+lightning = { git = "https://git.bitcoin.ninja/rust-lightning", rev = "800dc06dbb39f6c421adb81e6ba3508ded3d7d74", features = ["allow_wallclock_use"] }
+lightning-persister = { git = "https://git.bitcoin.ninja/rust-lightning", rev = "800dc06dbb39f6c421adb81e6ba3508ded3d7d74" }
+lightning-invoice = { git = "https://git.bitcoin.ninja/rust-lightning", rev = "800dc06dbb39f6c421adb81e6ba3508ded3d7d74" }
+lightning-background-processor = { git = "https://git.bitcoin.ninja/rust-lightning", rev = "800dc06dbb39f6c421adb81e6ba3508ded3d7d74" }
[patch.crates-io]
# Rust-Secp256k1 upstream to get PR 279 until it is released.
*/
void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
+/**
+ * Creates a copy of the ChannelMonitor
+ */
+struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
+
/**
* Serialize the ChannelMonitor object into a byte array which can be read by ChannelMonitor_read
*/
ret
}
}
+impl Clone for ChannelMonitor {
+ fn clone(&self) -> Self {
+ Self {
+ inner: if <*mut nativeChannelMonitor>::is_null(self.inner) { std::ptr::null_mut() } else {
+ Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
+ is_owned: true,
+ }
+ }
+}
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn ChannelMonitor_clone_void(this_ptr: *const c_void) -> *mut c_void {
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeChannelMonitor)).clone() })) as *mut c_void
+}
+#[no_mangle]
+/// Creates a copy of the ChannelMonitor
+pub extern "C" fn ChannelMonitor_clone(orig: &ChannelMonitor) -> ChannelMonitor {
+ orig.clone()
+}
#[no_mangle]
/// Serialize the ChannelMonitor object into a byte array which can be read by ChannelMonitor_read
pub extern "C" fn ChannelMonitor_write(obj: &ChannelMonitor) -> crate::c_types::derived::CVec_u8Z {