From 59578d9f1a87db24a30303ec3bc0a3b7e48f95e0 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Thu, 25 Aug 2022 04:27:00 +0800 Subject: [PATCH] routing: add more verbose logs --- routing/bandwidth.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routing/bandwidth.go b/routing/bandwidth.go index 8abf025ab..19c608701 100644 --- a/routing/bandwidth.go +++ b/routing/bandwidth.go @@ -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 }