@@ -457,6 +457,7 @@ macro_rules! handle_monitor_err {
457
457
( $self: ident, $err: expr, $channel_state: expr, $entry: expr, $action_type: path, $resend_raa: expr, $resend_commitment: expr, $failed_forwards: expr, $failed_fails: expr) => {
458
458
match $err {
459
459
ChannelMonitorUpdateErr :: PermanentFailure => {
460
+ log_error!( $self, "Closing channel {} due to monitor update PermanentFailure" , log_bytes!( $entry. key( ) [ ..] ) ) ;
460
461
let ( channel_id, mut chan) = $entry. remove_entry( ) ;
461
462
if let Some ( short_id) = chan. get_short_channel_id( ) {
462
463
$channel_state. short_to_id. remove( & short_id) ;
@@ -474,6 +475,18 @@ macro_rules! handle_monitor_err {
474
475
res
475
476
} ,
476
477
ChannelMonitorUpdateErr :: TemporaryFailure => {
478
+ log_info!( $self, "Disabling channel {} due to monitor update TemporaryFailure. On restore will send {} and process {} forwards and {} fails" ,
479
+ log_bytes!( $entry. key( ) [ ..] ) ,
480
+ if $resend_commitment && $resend_raa {
481
+ match $action_type {
482
+ RAACommitmentOrder :: CommitmentFirst => { "commitment then RAA" } ,
483
+ RAACommitmentOrder :: RevokeAndACKFirst => { "RAA then commitment" } ,
484
+ }
485
+ } else if $resend_commitment { "commitment" }
486
+ else if $resend_raa { "RAA" }
487
+ else { "nothing" } ,
488
+ ( & $failed_forwards as & Vec <( PendingForwardHTLCInfo , u64 ) >) . len( ) ,
489
+ ( & $failed_fails as & Vec <( HTLCSource , PaymentHash , HTLCFailReason ) >) . len( ) ) ;
477
490
if !$resend_commitment {
478
491
debug_assert!( $action_type == RAACommitmentOrder :: RevokeAndACKFirst || !$resend_raa) ;
479
492
}
0 commit comments