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.
This commit is contained in:
Wilmer Paulino 2018-04-21 11:31:50 -04:00
parent 435e68a438
commit a34b2d7de2
No known key found for this signature in database
GPG Key ID: 6DF57B9F9514972F

View File

@ -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() {