mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
550f8f0d5a
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. |
||
---|---|---|
.. | ||
bootstrapper.go | ||
chan_series.go | ||
gossiper_test.go | ||
gossiper.go | ||
log.go | ||
message_store_test.go | ||
message_store.go | ||
mock_test.go | ||
reliable_sender_test.go | ||
reliable_sender.go | ||
sync_manager_test.go | ||
sync_manager.go | ||
syncer_test.go | ||
syncer.go |