@@ -1709,7 +1709,7 @@ where
17091709
17101710 // Update the monitor with the shutdown script if necessary.
17111711 if let Some ( monitor_update) = monitor_update {
1712- let update_res = self . chain_monitor . update_channel ( chan_entry. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor_update) ;
1712+ let update_res = self . chain_monitor . update_channel ( chan_entry. get ( ) . get_funding_txo ( ) . unwrap ( ) , & monitor_update) ;
17131713 let ( result, is_permanent) =
17141714 handle_monitor_update_res ! ( self , update_res, chan_entry. get_mut( ) , RAACommitmentOrder :: CommitmentFirst , chan_entry. key( ) , NO_UPDATE ) ;
17151715 if is_permanent {
@@ -1807,7 +1807,7 @@ where
18071807 // force-closing. The monitor update on the required in-memory copy should broadcast
18081808 // the latest local state, which is the best we can do anyway. Thus, it is safe to
18091809 // ignore the result here.
1810- let _ = self . chain_monitor . update_channel ( funding_txo, monitor_update) ;
1810+ let _ = self . chain_monitor . update_channel ( funding_txo, & monitor_update) ;
18111811 }
18121812 }
18131813
@@ -2336,7 +2336,7 @@ where
23362336 chan)
23372337 } {
23382338 Some ( ( update_add, commitment_signed, monitor_update) ) => {
2339- let update_err = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor_update) ;
2339+ let update_err = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , & monitor_update) ;
23402340 let chan_id = chan. get ( ) . channel_id ( ) ;
23412341 match ( update_err,
23422342 handle_monitor_update_res ! ( self , update_err, chan,
@@ -3284,7 +3284,7 @@ where
32843284 BackgroundEvent :: ClosingMonitorUpdate ( ( funding_txo, update) ) => {
32853285 // The channel has already been closed, so no use bothering to care about the
32863286 // monitor updating completing.
3287- let _ = self . chain_monitor . update_channel ( funding_txo, update) ;
3287+ let _ = self . chain_monitor . update_channel ( funding_txo, & update) ;
32883288 } ,
32893289 }
32903290 }
@@ -3807,7 +3807,7 @@ where
38073807 match chan. get_mut ( ) . get_update_fulfill_htlc_and_commit ( prev_hop. htlc_id , payment_preimage, & self . logger ) {
38083808 Ok ( msgs_monitor_option) => {
38093809 if let UpdateFulfillCommitFetch :: NewClaim { msgs, htlc_value_msat, monitor_update } = msgs_monitor_option {
3810- match self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor_update) {
3810+ match self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , & monitor_update) {
38113811 ChannelMonitorUpdateStatus :: Completed => { } ,
38123812 e => {
38133813 log_given_level ! ( self . logger, if e == ChannelMonitorUpdateStatus :: PermanentFailure { Level :: Error } else { Level :: Debug } ,
@@ -3844,7 +3844,7 @@ where
38443844 }
38453845 } ,
38463846 Err ( ( e, monitor_update) ) => {
3847- match self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor_update) {
3847+ match self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , & monitor_update) {
38483848 ChannelMonitorUpdateStatus :: Completed => { } ,
38493849 e => {
38503850 // TODO: This needs to be handled somehow - if we receive a monitor update
@@ -3880,7 +3880,7 @@ where
38803880 } ;
38813881 // We update the ChannelMonitor on the backward link, after
38823882 // receiving an `update_fulfill_htlc` from the forward link.
3883- let update_res = self . chain_monitor . update_channel ( prev_hop. outpoint , preimage_update) ;
3883+ let update_res = self . chain_monitor . update_channel ( prev_hop. outpoint , & preimage_update) ;
38843884 if update_res != ChannelMonitorUpdateStatus :: Completed {
38853885 // TODO: This needs to be handled somehow - if we receive a monitor update
38863886 // with a preimage we *must* somehow manage to propagate it to the upstream
@@ -4449,7 +4449,7 @@ where
44494449
44504450 // Update the monitor with the shutdown script if necessary.
44514451 if let Some ( monitor_update) = monitor_update {
4452- let update_res = self . chain_monitor . update_channel ( chan_entry. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor_update) ;
4452+ let update_res = self . chain_monitor . update_channel ( chan_entry. get ( ) . get_funding_txo ( ) . unwrap ( ) , & monitor_update) ;
44534453 let ( result, is_permanent) =
44544454 handle_monitor_update_res ! ( self , update_res, chan_entry. get_mut( ) , RAACommitmentOrder :: CommitmentFirst , chan_entry. key( ) , NO_UPDATE ) ;
44554455 if is_permanent {
@@ -4650,13 +4650,13 @@ where
46504650 Err ( ( None , e) ) => try_chan_entry ! ( self , Err ( e) , chan) ,
46514651 Err ( ( Some ( update) , e) ) => {
46524652 assert ! ( chan. get( ) . is_awaiting_monitor_update( ) ) ;
4653- let _ = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , update) ;
4653+ let _ = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , & update) ;
46544654 try_chan_entry ! ( self , Err ( e) , chan) ;
46554655 unreachable ! ( ) ;
46564656 } ,
46574657 Ok ( res) => res
46584658 } ;
4659- let update_res = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , monitor_update) ;
4659+ let update_res = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , & monitor_update) ;
46604660 if let Err ( e) = handle_monitor_update_res ! ( self , update_res, chan, RAACommitmentOrder :: RevokeAndACKFirst , true , commitment_signed. is_some( ) ) {
46614661 return Err ( e) ;
46624662 }
@@ -4792,7 +4792,7 @@ where
47924792 let raa_updates = break_chan_entry ! ( self ,
47934793 chan. get_mut( ) . revoke_and_ack( & msg, & self . logger) , chan) ;
47944794 htlcs_to_fail = raa_updates. holding_cell_failed_htlcs ;
4795- let update_res = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , raa_updates. monitor_update ) ;
4795+ let update_res = self . chain_monitor . update_channel ( chan. get ( ) . get_funding_txo ( ) . unwrap ( ) , & raa_updates. monitor_update ) ;
47964796 if was_paused_for_mon_update {
47974797 assert ! ( update_res != ChannelMonitorUpdateStatus :: Completed ) ;
47984798 assert ! ( raa_updates. commitment_update. is_none( ) ) ;
@@ -5097,7 +5097,7 @@ where
50975097 ) ) ;
50985098 }
50995099 if let Some ( ( commitment_update, monitor_update) ) = commitment_opt {
5100- match self . chain_monitor . update_channel ( chan. get_funding_txo ( ) . unwrap ( ) , monitor_update) {
5100+ match self . chain_monitor . update_channel ( chan. get_funding_txo ( ) . unwrap ( ) , & monitor_update) {
51015101 ChannelMonitorUpdateStatus :: Completed => {
51025102 pending_msg_events. push ( events:: MessageSendEvent :: UpdateHTLCs {
51035103 node_id : chan. get_counterparty_node_id ( ) ,
0 commit comments