mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-10 00:13:37 +02:00
routing: add more verbose logs
This commit is contained in:
@@ -77,6 +77,7 @@ func (b *bandwidthManager) getBandwidth(cid lnwire.ShortChannelID,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
// If the link isn't online, then we'll report that it has
|
// If the link isn't online, then we'll report that it has
|
||||||
// zero bandwidth.
|
// zero bandwidth.
|
||||||
|
log.Warnf("ShortChannelID=%v: link not found: %v", cid, err)
|
||||||
return 0
|
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
|
// to forward any HTLCs, then we'll treat it as if it isn't online in
|
||||||
// the first place.
|
// the first place.
|
||||||
if !link.EligibleToForward() {
|
if !link.EligibleToForward() {
|
||||||
|
log.Warnf("ShortChannelID=%v: not eligible to forward", cid)
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// If our link isn't currently in a state where it can add another
|
// If our link isn't currently in a state where it can add another
|
||||||
// outgoing htlc, treat the link as unusable.
|
// outgoing htlc, treat the link as unusable.
|
||||||
if err := link.MayAddOutgoingHtlc(amount); err != nil {
|
if err := link.MayAddOutgoingHtlc(amount); err != nil {
|
||||||
|
log.Warnf("ShortChannelID=%v: cannot add outgoing htlc: %v",
|
||||||
|
cid, err)
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user