mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-03 17:26:57 +01:00
routing: add more verbose logs
This commit is contained in:
parent
bc0bdfefc2
commit
59578d9f1a
1 changed files with 4 additions and 0 deletions
|
@ -77,6 +77,7 @@ func (b *bandwidthManager) getBandwidth(cid lnwire.ShortChannelID,
|
|||
if err != nil {
|
||||
// If the link isn't online, then we'll report that it has
|
||||
// zero bandwidth.
|
||||
log.Warnf("ShortChannelID=%v: link not found: %v", cid, err)
|
||||
return 0
|
||||
}
|
||||
|
||||
|
@ -84,12 +85,15 @@ func (b *bandwidthManager) getBandwidth(cid lnwire.ShortChannelID,
|
|||
// to forward any HTLCs, then we'll treat it as if it isn't online in
|
||||
// the first place.
|
||||
if !link.EligibleToForward() {
|
||||
log.Warnf("ShortChannelID=%v: not eligible to forward", cid)
|
||||
return 0
|
||||
}
|
||||
|
||||
// If our link isn't currently in a state where it can add another
|
||||
// outgoing htlc, treat the link as unusable.
|
||||
if err := link.MayAddOutgoingHtlc(amount); err != nil {
|
||||
log.Warnf("ShortChannelID=%v: cannot add outgoing htlc: %v",
|
||||
cid, err)
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue