lnd/discovery
eugene 550f8f0d5a server+discovery: alias-handling in gossiper
An OptionalMsgField has been added that allows outside subsystems
to provide a short channel id we should insert into a ChannelUpdate
that we then sign and send to our peer.

When the gossiper receives a ChannelUpdate, it will query the
alias manager by the passed-in FindBaseByAlias function to determine
if the short channel id in the ChannelUpdate points to a known
channel. If this lookup returns an error, we'll fallback to using
the original id in the ChannelUpdate when querying the router.
The lookup and potential fallback must occur in order to properly
lock the multimutex, query the correct router channels, and rate
limit the correct short channel id. An unfortunate side effect of
receiving ChannelUpdates from our peer that reference on of our
aliases rather than the real SCID is that we must store this policy.
Yet it is not broadcast-able. Care has been taken to ensure the
gossiper does not broadcast *any* ChannelUpdate with an alias SCID.

The cachedNetworkMsg uses the new processedNetworkMsg struct. This
is necessary so that delete-and-reinsert in the funding manager
doesn't process a ChannelUpdate twice and end up in a deadlock since
the err chan is no longer being used.
2022-08-12 16:58:16 -07:00
..
bootstrapper.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
chan_series.go discovery: adhere to proper channel chunk splitting for ReplyChannelRange 2020-12-08 15:18:07 -08:00
gossiper_test.go server+discovery: alias-handling in gossiper 2022-08-12 16:58:16 -07:00
gossiper.go server+discovery: alias-handling in gossiper 2022-08-12 16:58:16 -07:00
log.go multi: init subsystem loggers via build pkg 2018-10-05 13:04:45 +09:00
message_store_test.go multi: move many t.Fatalf calls to require.NoError 2022-06-17 04:26:55 +00:00
message_store.go multi: move all channelstate operations to ChannelStateDB 2021-09-29 17:00:03 +02:00
mock_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
reliable_sender_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
reliable_sender.go discovery: shorten mutex locking closure 2022-01-05 04:27:32 +08:00
sync_manager_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
sync_manager.go multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
syncer_test.go multi: move many t.Fatalf calls to require.NoError 2022-06-17 04:26:55 +00:00
syncer.go multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00