-/// Updates channel state to take note of transactions which were confirmed in the given block
-/// at the given height.
-///
-/// Note that you must still call (or have called) [`update_best_block`] with the block
-/// information which is included here.
-///
-/// This method may be called before or after [`update_best_block`] for a given block's
-/// transaction data and may be called multiple times with additional transaction data for a
-/// given block.
-///
-/// This method may be called for a previous block after an [`update_best_block`] call has
-/// been made for a later block, however it must *not* be called with transaction data from a
-/// block which is no longer in the best chain (ie where [`update_best_block`] has already
-/// been informed about a blockchain reorganization which no longer includes the block which
-/// corresponds to `header`).
-///
-/// [`update_best_block`]: `Self::update_best_block`
-#[no_mangle]
-pub extern "C" fn ChannelManager_transactions_confirmed(this_arg: &ChannelManager, header: *const [u8; 80], mut height: u32, mut txdata: crate::c_types::derived::CVec_C2Tuple_usizeTransactionZZ) {
- let mut local_txdata = Vec::new(); for mut item in txdata.into_rust().drain(..) { local_txdata.push( { let (mut orig_txdata_0_0, mut orig_txdata_0_1) = item.to_rust(); let mut local_txdata_0 = (orig_txdata_0_0, orig_txdata_0_1.into_bitcoin()); local_txdata_0 }); };
- unsafe { &*this_arg.inner }.transactions_confirmed(&::bitcoin::consensus::encode::deserialize(unsafe { &*header }).unwrap(), height, &local_txdata.iter().map(|(a, b)| (*a, b)).collect::<Vec<_>>()[..])
+impl From<nativeChannelManager> for crate::lightning::chain::Confirm {
+ fn from(obj: nativeChannelManager) -> Self {
+ let mut rust_obj = ChannelManager { inner: Box::into_raw(Box::new(obj)), is_owned: true };
+ let mut ret = ChannelManager_as_Confirm(&rust_obj);
+ // We want to free rust_obj when ret gets drop()'d, not rust_obj, so wipe rust_obj's pointer and set ret's free() fn
+ rust_obj.inner = std::ptr::null_mut();
+ ret.free = Some(ChannelManager_free_void);
+ ret
+ }