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