From a50428ca9684ec0b7a75582ccc2907576d495e25 Mon Sep 17 00:00:00 2001 From: cryptagoras Date: Mon, 25 Mar 2019 18:25:58 +0200 Subject: [PATCH] htlcswitch/switch: log target node on insufficient cap error --- htlcswitch/switch.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htlcswitch/switch.go b/htlcswitch/switch.go index 63e19f33..f48cbdc9 100644 --- a/htlcswitch/switch.go +++ b/htlcswitch/switch.go @@ -1038,7 +1038,8 @@ func (s *Switch) handlePacketForward(packet *htlcPacket) error { return s.failAddPacket(packet, failure, addErr) } - interfaceLinks, _ := s.getLinks(targetLink.Peer().PubKey()) + targetPeerKey := targetLink.Peer().PubKey() + interfaceLinks, _ := s.getLinks(targetPeerKey) s.indexMtx.RUnlock() // We'll keep track of any HTLC failures during the link @@ -1105,7 +1106,7 @@ func (s *Switch) handlePacketForward(packet *htlcPacket) error { addErr := fmt.Errorf("unable to find appropriate "+ "channel link insufficient capacity, need "+ - "%v", htlc.Amount) + "%v towards node=%x", htlc.Amount, targetPeerKey) return s.failAddPacket(packet, failure, addErr)