Merge pull request #9530 from ziggie1984/fix-debug-log

multi: fix debug log
This commit is contained in:
Oliver Gugger 2025-02-20 09:28:14 -06:00 committed by GitHub
commit 09a4d7e224
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 7 deletions

View File

@ -3450,7 +3450,7 @@ func (l *channelLink) canSendHtlc(policy models.ForwardingPolicy,
// Check to see if there is enough balance in this channel. // Check to see if there is enough balance in this channel.
if amt > availableBandwidth { if amt > availableBandwidth {
l.log.Warnf("insufficient bandwidth to route htlc: %v is "+ l.log.Warnf("insufficient bandwidth to route htlc: %v is "+
"larger than %v", amt, l.Bandwidth()) "larger than %v", amt, availableBandwidth)
cb := func(upd *lnwire.ChannelUpdate1) lnwire.FailureMessage { cb := func(upd *lnwire.ChannelUpdate1) lnwire.FailureMessage {
return lnwire.NewTemporaryChannelFailure(upd) return lnwire.NewTemporaryChannelFailure(upd)
} }

View File

@ -8871,13 +8871,16 @@ func (lc *LightningChannel) availableCommitmentBalance(view *HtlcView,
ourBalance, futureCommitWeight, feePerKw, buffer, ourBalance, futureCommitWeight, feePerKw, buffer,
) )
if err != nil { if err != nil {
lc.log.Warnf("Set available amount to 0 because we "+ lc.log.Debugf("No available local balance after "+
"could not pay for the CommitmentFee of the "+ "applying the CommitmentFee of the new "+
"new ChannelState: ourBalance is negative "+ "CommitmentState(%v): ourBalance would drop "+
"after applying the fee: ourBalance=%v, "+ "below the reserve: "+
"ourBalance(w/o reserve)=%v, reserve=%v, "+
"current commitFee(w/o additional htlc)=%v, "+ "current commitFee(w/o additional htlc)=%v, "+
"feeBuffer=%v (type=%v) local_chan_initiator", "feeBuffer=%v (type=%v) "+
ourBalance, commitFee, bufferAmt, buffer) "local_chan_initiator=%v", whoseCommitChain,
ourBalance, ourReserve, commitFee, bufferAmt,
buffer, lc.channelState.IsInitiator)
return 0, commitWeight return 0, commitWeight
} }