@@ -3644,6 +3644,10 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
3644
3644
if release_monitor { self . pending_monitor_updates . last ( ) . map ( |upd| & upd. update ) } else { None } ) ) ;
3645
3645
}
3646
3646
3647
+ let release_monitor = self . pending_monitor_updates . iter ( ) . all ( |upd| !upd. blocked ) && !hold_mon_update;
3648
+ let release_state_str =
3649
+ if hold_mon_update { "Holding" } else if release_monitor { "Releasing" } else { "Blocked" } ;
3650
+
3647
3651
match self . free_holding_cell_htlcs ( logger) {
3648
3652
( Some ( _) , htlcs_to_fail) => {
3649
3653
let mut additional_update = self . pending_monitor_updates . pop ( ) . unwrap ( ) . update ;
@@ -3652,8 +3656,10 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
3652
3656
self . latest_monitor_update_id = monitor_update. update_id ;
3653
3657
monitor_update. updates . append ( & mut additional_update. updates ) ;
3654
3658
3659
+ log_debug ! ( logger, "Received a valid revoke_and_ack for channel {} with holding cell HTLCs freed. {} monitor update." ,
3660
+ log_bytes!( self . channel_id( ) ) , release_state_str) ;
3661
+
3655
3662
self . monitor_updating_paused ( false , true , false , to_forward_infos, revoked_htlcs, finalized_claimed_htlcs) ;
3656
- let release_monitor = self . pending_monitor_updates . iter ( ) . all ( |upd| !upd. blocked ) && !hold_mon_update;
3657
3663
self . pending_monitor_updates . push ( PendingChannelMonitorUpdate {
3658
3664
update : monitor_update, blocked : !release_monitor,
3659
3665
} ) ;
@@ -3669,19 +3675,22 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
3669
3675
self . latest_monitor_update_id = monitor_update. update_id ;
3670
3676
monitor_update. updates . append ( & mut additional_update. updates ) ;
3671
3677
3672
- log_debug ! ( logger, "Received a valid revoke_and_ack for channel {}. Responding with a commitment update with {} HTLCs failed." ,
3673
- log_bytes!( self . channel_id( ) ) , update_fail_htlcs. len( ) + update_fail_malformed_htlcs. len( ) ) ;
3678
+ log_debug ! ( logger, "Received a valid revoke_and_ack for channel {}. Responding with a commitment update with {} HTLCs failed. {} monitor update." ,
3679
+ log_bytes!( self . channel_id( ) ) ,
3680
+ update_fail_htlcs. len( ) + update_fail_malformed_htlcs. len( ) ,
3681
+ release_state_str) ;
3682
+
3674
3683
self . monitor_updating_paused ( false , true , false , to_forward_infos, revoked_htlcs, finalized_claimed_htlcs) ;
3675
- let release_monitor = self . pending_monitor_updates . iter ( ) . all ( |upd| !upd. blocked ) && !hold_mon_update;
3676
3684
self . pending_monitor_updates . push ( PendingChannelMonitorUpdate {
3677
3685
update : monitor_update, blocked : !release_monitor,
3678
3686
} ) ;
3679
3687
Ok ( ( htlcs_to_fail,
3680
3688
if release_monitor { self . pending_monitor_updates . last ( ) . map ( |upd| & upd. update ) } else { None } ) )
3681
3689
} else {
3682
- log_debug ! ( logger, "Received a valid revoke_and_ack for channel {} with no reply necessary." , log_bytes!( self . channel_id( ) ) ) ;
3690
+ log_debug ! ( logger, "Received a valid revoke_and_ack for channel {} with no reply necessary. {} monitor update." ,
3691
+ log_bytes!( self . channel_id( ) ) , release_state_str) ;
3692
+
3683
3693
self . monitor_updating_paused ( false , false , false , to_forward_infos, revoked_htlcs, finalized_claimed_htlcs) ;
3684
- let release_monitor = self . pending_monitor_updates . iter ( ) . all ( |upd| !upd. blocked ) && !hold_mon_update;
3685
3694
self . pending_monitor_updates . push ( PendingChannelMonitorUpdate {
3686
3695
update : monitor_update, blocked : !release_monitor,
3687
3696
} ) ;
0 commit comments