rust-lightning/lightning
Matt Corallo 422bdcf814 Never generate a BroadcastChannelUpdate for priv channels
Currently we always generate a
`MessageSendEvent::BroadcastChannelUpdate` when a channel is closed
even if the channel is private. Our immediate peers should ignore
such messages as they haven't seen a corresponding
`channel_announcement`, but we are still giving up some privacy by
informing our immediate peers of which channels were ours.

Here we split `ChannelManager::get_channel_update` into a
`get_channel_update_for_broadcast` and
`get_channel_update_for_unicast`. The first is used when we are
broadcasting a `channel_update`, allowing us to refuse to do so
for private channels. The second is used when failing a payment (in
which case the recipient has already shown that they are aware of
the channel so no such privacy concerns exist).
2021-07-02 22:21:32 +00:00
..
src Never generate a BroadcastChannelUpdate for priv channels 2021-07-02 22:21:32 +00:00
Cargo.toml Use hashbrown replacements for std equivalents 2021-06-18 21:54:21 +00:00