From a34b2d7de2d8d3644105d42342e1f3ab22d79bcb Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Sat, 21 Apr 2018 11:31:50 -0400 Subject: [PATCH] rpcserver: add missing continue if link wasn't retrieved In this commit, we avoid hitting a possible panic in the case that we were unable to retrieve the link of a channel from the HTLC switch while determining which channels should be used as routing hints for an invoice. --- rpcserver.go | 1 + 1 file changed, 1 insertion(+) diff --git a/rpcserver.go b/rpcserver.go index fd4dc93b..b70f960d 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -2254,6 +2254,7 @@ func (r *rpcServer) AddInvoice(ctx context.Context, if err != nil { rpcsLog.Errorf("Unable to get link for "+ "channel %v: %v", chanPoint, err) + continue } if !link.EligibleToForward() {