mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-18 21:35:24 +01:00
443095a907
This commit makes the `handleChanAnnouncement` always returning `true` for messages processed but ignored by router, even when the extracted announcements are empty. Previously we'd return false when the announcements are empty, which could cause `ChannelUpdate`s being ignored since the validation barrier will signal deny for the jobs. This can easily be trigger using following setup, 1. Alice connects to Bob and open a channel. 2. Alice connects to Carol, Bob connects to Carol. 3. Once the channel is open, Alice and Bob will both announce it to Carol. At some point, we'd have the following messages in Carol's node, - Alice's ChannelAnnouncement - Alice's ChannelUpdates, for both directions - Bob's ChannelAnnouncement - Bob's ChannelUpdates, for both directions And a bug could happen, if, - Alice's ChannelAnnouncement is processed by router, hence added to db, but not reporting back to gossiper yet, so the validation barrier hasn't sent signal allow. - Bob's ChannelAnnouncement is processed by router, and returned `ErrIgnored` as the edge info is already in db, and reported back to gossiper, the validation barrier will signal deny to all the ChannelUpdates jobs. - Depending on how fast Alice's ChannelAnnouncement is processed, we may get zero to four denies to the above ChannelUpdates, causing a channel edge policy never being updated. |
||
---|---|---|
.. | ||
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 |