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:
Christian Decker
2022-04-22 12:57:01 +02:00
parent 9d3cb95489
commit de1c0b51f0
7 changed files with 71 additions and 4 deletions

View File

@@ -875,6 +875,14 @@ static struct migration dbmigrations[] = {
{SQL("ALTER TABLE forwarded_payments ADD forward_style INTEGER DEFAULT NULL"), NULL},
/* "description" is used for label, so we use "paydescription" here */
{SQL("ALTER TABLE payments ADD paydescription TEXT;"), NULL},
/* Alias we sent to the remote side, for zeroconf and
* option_scid_alias, can be a list of short_channel_ids if
* required, but keeping it a single SCID for now. */
{SQL("ALTER TABLE channels ADD alias_local BIGINT DEFAULT NULL"), NULL},
/* Alias we received from the peer, and which we should be using
* in routehints in invoices. The peer will remember all the
* aliases, but we only ever need one. */
{SQL("ALTER TABLE channels ADD alias_remote BIGINT DEFAULT NULL"), NULL},
};
/**