diff --git a/htlcswitch/link.go b/htlcswitch/link.go index a867f6b00..99b758ce9 100644 --- a/htlcswitch/link.go +++ b/htlcswitch/link.go @@ -1084,8 +1084,13 @@ func (l *channelLink) htlcManager() { // batch is empty. if l.channel.PendingLocalUpdateCount() > 0 { l.cfg.BatchTicker.Resume() + l.log.Tracef("BatchTicker resumed, "+ + "PendingLocalUpdateCount=%d", + l.channel.PendingLocalUpdateCount()) } else { l.cfg.BatchTicker.Pause() + l.log.Trace("BatchTicker paused due to zero " + + "PendingLocalUpdateCount") } select { @@ -2102,6 +2107,7 @@ func (l *channelLink) updateCommitTx() error { theirCommitSig, htlcSigs, pendingHTLCs, err := l.channel.SignNextCommitment() if err == lnwallet.ErrNoWindow { l.cfg.PendingCommitTicker.Resume() + l.log.Trace("PendingCommitTicker resumed") l.log.Tracef("revocation window exhausted, unable to send: "+ "%v, pend_updates=%v, dangling_closes%v", @@ -2123,6 +2129,7 @@ func (l *channelLink) updateCommitTx() error { } l.cfg.PendingCommitTicker.Pause() + l.log.Trace("PendingCommitTicker paused after ackDownStreamPackets") // The remote party now has a new pending commitment, so we'll update // the contract court to be aware of this new set (the prior old remote diff --git a/lnwallet/channel.go b/lnwallet/channel.go index 489265d9a..22a53defc 100644 --- a/lnwallet/channel.go +++ b/lnwallet/channel.go @@ -3530,7 +3530,10 @@ func (lc *LightningChannel) SignNextCommitment() (lnwire.Sig, []lnwire.Sig, // party, then we're unable to create new states. Each time we create a // new state, we consume a prior revocation point. commitPoint := lc.channelState.RemoteNextRevocation - if lc.remoteCommitChain.hasUnackedCommitment() || commitPoint == nil { + unacked := lc.remoteCommitChain.hasUnackedCommitment() + if unacked || commitPoint == nil { + lc.log.Tracef("waiting for remote ack=%v, nil "+ + "RemoteNextRevocation: %v", unacked, commitPoint == nil) return sig, htlcSigs, nil, ErrNoWindow }