@@ -368,10 +368,10 @@ impl ChainMonitor {
368
368
/// transactions relevant to the watched channels.
369
369
#[ must_use]
370
370
#[ no_mangle]
371
- pub extern "C" fn ChainMonitor_new ( mut chain_source : crate :: c_types:: derived:: COption_FilterZ , mut broadcaster : crate :: lightning:: chain:: chaininterface:: BroadcasterInterface , mut logger : crate :: lightning:: util:: logger:: Logger , mut feeest : crate :: lightning:: chain:: chaininterface:: FeeEstimator , mut persister : crate :: lightning:: chain:: chainmonitor:: Persist ) -> ChainMonitor {
371
+ pub extern "C" fn ChainMonitor_new ( mut chain_source : crate :: c_types:: derived:: COption_FilterZ , mut broadcaster : crate :: lightning:: chain:: chaininterface:: BroadcasterInterface , mut logger : crate :: lightning:: util:: logger:: Logger , mut feeest : crate :: lightning:: chain:: chaininterface:: FeeEstimator , mut persister : crate :: lightning:: chain:: chainmonitor:: Persist ) -> crate :: lightning :: chain :: chainmonitor :: ChainMonitor {
372
372
let mut local_chain_source = { /* chain_source*/ let chain_source_opt = chain_source; { } if chain_source_opt. is_none ( ) { None } else { Some ( { chain_source_opt. take ( ) } ) } } ;
373
373
let mut ret = lightning:: chain:: chainmonitor:: ChainMonitor :: new ( local_chain_source, broadcaster, logger, feeest, persister) ;
374
- ChainMonitor { inner : ObjOps :: heap_alloc ( ret) , is_owned : true }
374
+ crate :: lightning :: chain :: chainmonitor :: ChainMonitor { inner : ObjOps :: heap_alloc ( ret) , is_owned : true }
375
375
}
376
376
377
377
/// Gets the balances in the contained [`ChannelMonitor`]s which are claimable on-chain or
@@ -385,7 +385,7 @@ pub extern "C" fn ChainMonitor_new(mut chain_source: crate::c_types::derived::CO
385
385
/// inclusion in the return value.
386
386
#[ must_use]
387
387
#[ no_mangle]
388
- pub extern "C" fn ChainMonitor_get_claimable_balances ( this_arg : & ChainMonitor , mut ignored_channels : crate :: c_types:: derived:: CVec_ChannelDetailsZ ) -> crate :: c_types:: derived:: CVec_BalanceZ {
388
+ pub extern "C" fn ChainMonitor_get_claimable_balances ( this_arg : & crate :: lightning :: chain :: chainmonitor :: ChainMonitor , mut ignored_channels : crate :: c_types:: derived:: CVec_ChannelDetailsZ ) -> crate :: c_types:: derived:: CVec_BalanceZ {
389
389
let mut local_ignored_channels = Vec :: new ( ) ; for mut item in ignored_channels. as_slice ( ) . iter ( ) { local_ignored_channels. push ( { item. get_native_ref ( ) } ) ; } ;
390
390
let mut ret = unsafe { & * ObjOps :: untweak_ptr ( this_arg. inner ) } . get_claimable_balances ( & local_ignored_channels[ ..] ) ;
391
391
let mut local_ret = Vec :: new ( ) ; for mut item in ret. drain ( ..) { local_ret. push ( { crate :: lightning:: chain:: channelmonitor:: Balance :: native_into ( item) } ) ; } ;
@@ -399,7 +399,7 @@ pub extern "C" fn ChainMonitor_get_claimable_balances(this_arg: &ChainMonitor, m
399
399
/// indefinitely.
400
400
#[ must_use]
401
401
#[ no_mangle]
402
- pub extern "C" fn ChainMonitor_get_monitor ( this_arg : & ChainMonitor , mut funding_txo : crate :: lightning:: chain:: transaction:: OutPoint ) -> crate :: c_types:: derived:: CResult_LockedChannelMonitorNoneZ {
402
+ pub extern "C" fn ChainMonitor_get_monitor ( this_arg : & crate :: lightning :: chain :: chainmonitor :: ChainMonitor , mut funding_txo : crate :: lightning:: chain:: transaction:: OutPoint ) -> crate :: c_types:: derived:: CResult_LockedChannelMonitorNoneZ {
403
403
let mut ret = unsafe { & * ObjOps :: untweak_ptr ( this_arg. inner ) } . get_monitor ( * unsafe { Box :: from_raw ( funding_txo. take_inner ( ) ) } ) ;
404
404
let mut local_ret = match ret { Ok ( mut o) => crate :: c_types:: CResultTempl :: ok ( { crate :: lightning:: chain:: chainmonitor:: LockedChannelMonitor { inner : ObjOps :: heap_alloc ( o) , is_owned : true } } ) . into ( ) , Err ( mut e) => crate :: c_types:: CResultTempl :: err ( { ( ) /*e*/ } ) . into ( ) } ;
405
405
local_ret
@@ -411,7 +411,7 @@ pub extern "C" fn ChainMonitor_get_monitor(this_arg: &ChainMonitor, mut funding_
411
411
/// monitoring for on-chain state resolutions.
412
412
#[ must_use]
413
413
#[ no_mangle]
414
- pub extern "C" fn ChainMonitor_list_monitors ( this_arg : & ChainMonitor ) -> crate :: c_types:: derived:: CVec_OutPointZ {
414
+ pub extern "C" fn ChainMonitor_list_monitors ( this_arg : & crate :: lightning :: chain :: chainmonitor :: ChainMonitor ) -> crate :: c_types:: derived:: CVec_OutPointZ {
415
415
let mut ret = unsafe { & * ObjOps :: untweak_ptr ( this_arg. inner ) } . list_monitors ( ) ;
416
416
let mut local_ret = Vec :: new ( ) ; for mut item in ret. drain ( ..) { local_ret. push ( { crate :: lightning:: chain:: transaction:: OutPoint { inner : ObjOps :: heap_alloc ( item) , is_owned : true } } ) ; } ;
417
417
local_ret. into ( )
@@ -432,7 +432,7 @@ pub extern "C" fn ChainMonitor_list_monitors(this_arg: &ChainMonitor) -> crate::
432
432
/// registered [`ChannelMonitor`]s.
433
433
#[ must_use]
434
434
#[ no_mangle]
435
- pub extern "C" fn ChainMonitor_channel_monitor_updated ( this_arg : & ChainMonitor , mut funding_txo : crate :: lightning:: chain:: transaction:: OutPoint , mut completed_update_id : crate :: lightning:: chain:: chainmonitor:: MonitorUpdateId ) -> crate :: c_types:: derived:: CResult_NoneAPIErrorZ {
435
+ pub extern "C" fn ChainMonitor_channel_monitor_updated ( this_arg : & crate :: lightning :: chain :: chainmonitor :: ChainMonitor , mut funding_txo : crate :: lightning:: chain:: transaction:: OutPoint , mut completed_update_id : crate :: lightning:: chain:: chainmonitor:: MonitorUpdateId ) -> crate :: c_types:: derived:: CResult_NoneAPIErrorZ {
436
436
let mut ret = unsafe { & * ObjOps :: untweak_ptr ( this_arg. inner ) } . channel_monitor_updated ( * unsafe { Box :: from_raw ( funding_txo. take_inner ( ) ) } , * unsafe { Box :: from_raw ( completed_update_id. take_inner ( ) ) } ) ;
437
437
let mut local_ret = match ret { Ok ( mut o) => crate :: c_types:: CResultTempl :: ok ( { ( ) /*o*/ } ) . into ( ) , Err ( mut e) => crate :: c_types:: CResultTempl :: err ( { crate :: lightning:: util:: errors:: APIError :: native_into ( e) } ) . into ( ) } ;
438
438
local_ret
0 commit comments