@@ -2339,8 +2339,16 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2339
2339
F :: Target : FeeEstimator ,
2340
2340
L :: Target : Logger ,
2341
2341
{
2342
- log_info ! ( logger, "Applying update to monitor {}, bringing update_id from {} to {} with {} changes." ,
2343
- log_funding_info!( self ) , self . latest_update_id, updates. update_id, updates. updates. len( ) ) ;
2342
+ if self . latest_update_id == CLOSED_CHANNEL_UPDATE_ID && updates. update_id == CLOSED_CHANNEL_UPDATE_ID {
2343
+ log_info ! ( logger, "Applying post-force-closed update to monitor {} with {} change(s)." ,
2344
+ log_funding_info!( self ) , updates. updates. len( ) ) ;
2345
+ } else if updates. update_id == CLOSED_CHANNEL_UPDATE_ID {
2346
+ log_info ! ( logger, "Applying force close update to monitor {} with {} change(s)." ,
2347
+ log_funding_info!( self ) , updates. updates. len( ) ) ;
2348
+ } else {
2349
+ log_info ! ( logger, "Applying update to monitor {}, bringing update_id from {} to {} with {} change(s)." ,
2350
+ log_funding_info!( self ) , self . latest_update_id, updates. update_id, updates. updates. len( ) ) ;
2351
+ }
2344
2352
// ChannelMonitor updates may be applied after force close if we receive a preimage for a
2345
2353
// broadcasted commitment transaction HTLC output that we'd like to claim on-chain. If this
2346
2354
// is the case, we no longer have guaranteed access to the monitor's update ID, so we use a
@@ -2407,6 +2415,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
2407
2415
_ => false ,
2408
2416
} ) . is_some ( ) ;
2409
2417
if detected_funding_spend {
2418
+ log_trace ! ( logger, "Avoiding commitment broadcast, already detected confirmed spend onchain" ) ;
2410
2419
continue ;
2411
2420
}
2412
2421
self . broadcast_latest_holder_commitment_txn ( broadcaster, logger) ;
0 commit comments