Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pay: Fix another instance of a crash when we can't find ourselves #4608

Merged
merged 1 commit into from
Jun 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion plugins/libplugin-pay.c
Original file line number Diff line number Diff line change
Expand Up @@ -2633,7 +2633,7 @@ static void routehint_check_reachable(struct payment *p)
dst = gossmap_find_node(gossmap, p->destination);
if (dst == NULL)
d->destination_reachable = false;
else {
else if (src != NULL) {
dij = dijkstra(tmpctx, gossmap, dst, AMOUNT_MSAT(1000),
10 / 1000000.0,
payment_route_can_carry_even_disabled,
Expand All @@ -2644,6 +2644,11 @@ static void routehint_check_reachable(struct payment *p)
/* If there was a route the destination is reachable
* without routehints. */
d->destination_reachable = r != NULL;
} else {
paymod_log(p, LOG_DBG,
"Could not locate ourselves in the network. "
"Allowing direct attempts");
d->destination_reachable = true;
}

if (d->destination_reachable) {
Expand Down