@@ -4235,6 +4235,7 @@ impl<Signer: Sign> Channel<Signer> {
4235
4235
}
4236
4236
/// Only fails in case of bad keys
4237
4237
fn send_commitment_no_status_check < L : Deref > ( & mut self , logger : & L ) -> Result < ( msgs:: CommitmentSigned , ChannelMonitorUpdate ) , ChannelError > where L :: Target : Logger {
4238
+ log_trace ! ( logger, "Updating HTLC state for a newly-sent commitment_signed..." ) ;
4238
4239
// We can upgrade the status of some HTLCs that are waiting on a commitment, even if we
4239
4240
// fail to generate this, we still are at least at a position where upgrading their status
4240
4241
// is acceptable.
@@ -4243,19 +4244,22 @@ impl<Signer: Sign> Channel<Signer> {
4243
4244
Some ( InboundHTLCState :: AwaitingAnnouncedRemoteRevoke ( forward_info. clone ( ) ) )
4244
4245
} else { None } ;
4245
4246
if let Some ( state) = new_state {
4247
+ log_trace ! ( logger, " ...promoting inbound AwaitingRemoteRevokeToAnnounce {} to AwaitingAnnouncedRemoteRevoke" , log_bytes!( htlc. payment_hash. 0 ) ) ;
4246
4248
htlc. state = state;
4247
4249
}
4248
4250
}
4249
4251
for htlc in self . pending_outbound_htlcs . iter_mut ( ) {
4250
4252
if let Some ( fail_reason) = if let & mut OutboundHTLCState :: AwaitingRemoteRevokeToRemove ( ref mut fail_reason) = & mut htlc. state {
4251
4253
Some ( fail_reason. take ( ) )
4252
4254
} else { None } {
4255
+ log_trace ! ( logger, " ...promoting outbound AwaitingRemoteRevokeToRemove {} to AwaitingRemovedRemoteRevoke" , log_bytes!( htlc. payment_hash. 0 ) ) ;
4253
4256
htlc. state = OutboundHTLCState :: AwaitingRemovedRemoteRevoke ( fail_reason) ;
4254
4257
}
4255
4258
}
4256
4259
if !self . is_outbound ( ) {
4257
4260
if let Some ( ( feerate, update_state) ) = self . pending_update_fee {
4258
4261
if update_state == InboundFeeUpdateState :: AwaitingRemoteRevokeToAnnounce {
4262
+ log_trace ! ( logger, " ...promoting inbound AwaitingRemoteRevokeToAnnounce fee update {} to Committed" , feerate) ;
4259
4263
self . feerate_per_kw = feerate;
4260
4264
self . pending_update_fee = None ;
4261
4265
}
0 commit comments