rust-lightning/lightning
Matt Corallo 61164afb2b Check the PK of the source of an error before closing chans from it
When we receive an error message from a peer, it can indicate a
channel which we should close. However, we previously did not
check that the counterparty who sends us such a message is the
counterparty with whom we have the channel, allowing any
connected peer to make us force-close any channel we have as long
as they know the channel id.

This commit simply changes the force-close logic to check that the
sender matches the channel's counterparty node_id, though as noted
in #105, we eventually need to change the indexing anyway to allow
absurdly terrible peers to open channels with us.

Found during review of #777.
2021-02-09 19:04:54 -05:00
..
src Check the PK of the source of an error before closing chans from it 2021-02-09 19:04:54 -05:00
Cargo.toml Expose test_utils to fuzztarget (in addition to _test_utils feature) 2021-01-04 12:40:40 -05:00