mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
invoice: Consider aliases too when selecting routehints
This commit is contained in:
@@ -106,6 +106,15 @@ routehint_candidates(const tal_t *ctx,
|
||||
|
||||
/* Check channel is in CHANNELD_NORMAL */
|
||||
candidate.c = find_channel_by_scid(peer, &r->short_channel_id);
|
||||
|
||||
/* Try seeing if we should be using a remote alias
|
||||
* instead. The `listpeers` result may have returned
|
||||
* the REMOTE alias, because it is the only scid we
|
||||
* have, and it is mandatory once the channel is in
|
||||
* CHANNELD_NORMAL. */
|
||||
if (!candidate.c)
|
||||
candidate.c = find_channel_by_alias(peer, &r->short_channel_id, REMOTE);
|
||||
|
||||
if (!candidate.c) {
|
||||
log_debug(ld->log, "%s: channel not found in peer %s",
|
||||
type_to_string(tmpctx,
|
||||
|
||||
Reference in New Issue
Block a user