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 = "6fcac8bc65ed6d372e0b8c367e9934c754f99ff3", features = ["allow_wallclock_use"] }
+lightning = { git = "https://git.bitcoin.ninja/rust-lightning", rev = "28dc5a1b22c38e0c37e92c9b8797e52130e9c812", features = ["allow_wallclock_use"] }
[patch.crates-io]
# Rust-Secp256k1 PR 279. Should be dropped once merged.
*/
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 {