mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-03 03:29:50 +02:00
htlcswitch+lnwallet: add trace logs for tickers
This commit is contained in:
parent
bd5e29ec83
commit
13ade7e9ce
@ -1084,8 +1084,13 @@ func (l *channelLink) htlcManager() {
|
|||||||
// batch is empty.
|
// batch is empty.
|
||||||
if l.channel.PendingLocalUpdateCount() > 0 {
|
if l.channel.PendingLocalUpdateCount() > 0 {
|
||||||
l.cfg.BatchTicker.Resume()
|
l.cfg.BatchTicker.Resume()
|
||||||
|
l.log.Tracef("BatchTicker resumed, "+
|
||||||
|
"PendingLocalUpdateCount=%d",
|
||||||
|
l.channel.PendingLocalUpdateCount())
|
||||||
} else {
|
} else {
|
||||||
l.cfg.BatchTicker.Pause()
|
l.cfg.BatchTicker.Pause()
|
||||||
|
l.log.Trace("BatchTicker paused due to zero " +
|
||||||
|
"PendingLocalUpdateCount")
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
@ -2102,6 +2107,7 @@ func (l *channelLink) updateCommitTx() error {
|
|||||||
theirCommitSig, htlcSigs, pendingHTLCs, err := l.channel.SignNextCommitment()
|
theirCommitSig, htlcSigs, pendingHTLCs, err := l.channel.SignNextCommitment()
|
||||||
if err == lnwallet.ErrNoWindow {
|
if err == lnwallet.ErrNoWindow {
|
||||||
l.cfg.PendingCommitTicker.Resume()
|
l.cfg.PendingCommitTicker.Resume()
|
||||||
|
l.log.Trace("PendingCommitTicker resumed")
|
||||||
|
|
||||||
l.log.Tracef("revocation window exhausted, unable to send: "+
|
l.log.Tracef("revocation window exhausted, unable to send: "+
|
||||||
"%v, pend_updates=%v, dangling_closes%v",
|
"%v, pend_updates=%v, dangling_closes%v",
|
||||||
@ -2123,6 +2129,7 @@ func (l *channelLink) updateCommitTx() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
l.cfg.PendingCommitTicker.Pause()
|
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 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
|
// the contract court to be aware of this new set (the prior old remote
|
||||||
|
@ -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
|
// party, then we're unable to create new states. Each time we create a
|
||||||
// new state, we consume a prior revocation point.
|
// new state, we consume a prior revocation point.
|
||||||
commitPoint := lc.channelState.RemoteNextRevocation
|
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
|
return sig, htlcSigs, nil, ErrNoWindow
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user