mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
zeroconf: Add alias_remote and alias_local to channel and DB
`alias_local` is generated locally and sent to the peer so it knows what we're calling the channel, while `alias_remote` is received by the peer so we know what to include in routehints when generating invoices.
This commit is contained in:
@@ -352,6 +352,8 @@ struct channel *new_channel(struct peer *peer, u64 dbid,
|
||||
bool remote_funding_locked,
|
||||
/* NULL or stolen */
|
||||
struct short_channel_id *scid,
|
||||
struct short_channel_id *alias_local STEALS,
|
||||
struct short_channel_id *alias_remote STEALS,
|
||||
struct channel_id *cid,
|
||||
struct amount_msat our_msat,
|
||||
struct amount_msat msat_to_us_min,
|
||||
@@ -437,6 +439,8 @@ struct channel *new_channel(struct peer *peer, u64 dbid,
|
||||
channel->our_funds = our_funds;
|
||||
channel->remote_funding_locked = remote_funding_locked;
|
||||
channel->scid = tal_steal(channel, scid);
|
||||
channel->alias[LOCAL] = tal_steal(channel, alias_local);
|
||||
channel->alias[REMOTE] = tal_steal(channel, alias_remote); /* Haven't gotten one yet. */
|
||||
channel->cid = *cid;
|
||||
channel->our_msat = our_msat;
|
||||
channel->msat_to_us_min = msat_to_us_min;
|
||||
|
||||
Reference in New Issue
Block a user