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:
parent
435e68a438
commit
a34b2d7de2
@ -2254,6 +2254,7 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
rpcsLog.Errorf("Unable to get link for "+
|
rpcsLog.Errorf("Unable to get link for "+
|
||||||
"channel %v: %v", chanPoint, err)
|
"channel %v: %v", chanPoint, err)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if !link.EligibleToForward() {
|
if !link.EligibleToForward() {
|
||||||
|
Loading…
Reference in New Issue
Block a user