Skip to content

Commit 09a4d7e

Browse files
authored
Merge pull request #9530 from ziggie1984/fix-debug-log
multi: fix debug log
2 parents 0e87863 + 9382fcb commit 09a4d7e

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

htlcswitch/link.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3450,7 +3450,7 @@ func (l *channelLink) canSendHtlc(policy models.ForwardingPolicy,
34503450
// Check to see if there is enough balance in this channel.
34513451
if amt > availableBandwidth {
34523452
l.log.Warnf("insufficient bandwidth to route htlc: %v is "+
3453-
"larger than %v", amt, l.Bandwidth())
3453+
"larger than %v", amt, availableBandwidth)
34543454
cb := func(upd *lnwire.ChannelUpdate1) lnwire.FailureMessage {
34553455
return lnwire.NewTemporaryChannelFailure(upd)
34563456
}

lnwallet/channel.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8871,13 +8871,16 @@ func (lc *LightningChannel) availableCommitmentBalance(view *HtlcView,
88718871
ourBalance, futureCommitWeight, feePerKw, buffer,
88728872
)
88738873
if err != nil {
8874-
lc.log.Warnf("Set available amount to 0 because we "+
8875-
"could not pay for the CommitmentFee of the "+
8876-
"new ChannelState: ourBalance is negative "+
8877-
"after applying the fee: ourBalance=%v, "+
8874+
lc.log.Debugf("No available local balance after "+
8875+
"applying the CommitmentFee of the new "+
8876+
"CommitmentState(%v): ourBalance would drop "+
8877+
"below the reserve: "+
8878+
"ourBalance(w/o reserve)=%v, reserve=%v, "+
88788879
"current commitFee(w/o additional htlc)=%v, "+
8879-
"feeBuffer=%v (type=%v) local_chan_initiator",
8880-
ourBalance, commitFee, bufferAmt, buffer)
8880+
"feeBuffer=%v (type=%v) "+
8881+
"local_chan_initiator=%v", whoseCommitChain,
8882+
ourBalance, ourReserve, commitFee, bufferAmt,
8883+
buffer, lc.channelState.IsInitiator)
88818884

88828885
return 0, commitWeight
88838886
}

0 commit comments

Comments
 (0)