mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 20:09:18 +01:00
ld: Consider local aliases when forwarding
This commit is contained in:
parent
1ae3dba529
commit
a4e6b58fa4
2 changed files with 8 additions and 0 deletions
|
@ -600,6 +600,11 @@ struct channel *any_channel_by_scid(struct lightningd *ld,
|
|||
if (chan->scid
|
||||
&& short_channel_id_eq(scid, chan->scid))
|
||||
return chan;
|
||||
/* We also want to find the channel by its local alias
|
||||
* when we forward. */
|
||||
if (chan->alias[LOCAL] &&
|
||||
short_channel_id_eq(scid, chan->alias[LOCAL]))
|
||||
return chan;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
|
|
@ -1629,6 +1629,9 @@ static struct listpeers_channel *json_to_listpeers_channel(const tal_t *ctx,
|
|||
chan->alias[REMOTE]);
|
||||
} else
|
||||
chan->alias[REMOTE] = NULL;
|
||||
} else {
|
||||
chan->alias[LOCAL] = NULL;
|
||||
chan->alias[REMOTE] = NULL;
|
||||
}
|
||||
|
||||
json_to_msat(buffer, tmsattok, &chan->total_msat);
|
||||
|
|
Loading…
Add table
Reference in a new issue