Fix EnforcingChannelKeys panic when our counterparty burns their $.
authorMatt Corallo <git@bluematt.me>
Sun, 12 Jan 2020 23:04:40 +0000 (18:04 -0500)
committerMatt Corallo <git@bluematt.me>
Sat, 25 Jan 2020 22:12:08 +0000 (17:12 -0500)
commit87091f082c5b5eb6f496ef6c9d316f39f9889f9a
treed389662259c0436106f675d2212d99a92ed0b41e
parent367602f283c575e5afe8f9b03bed643ad54b0b5f
Fix EnforcingChannelKeys panic when our counterparty burns their $.

If our counterparty burns their funds by revoking their current
commitment transaction before we've sent them a new one, we'll step
forward the remote commitment number. This would be otherwise fine
(and may even encourage them to broadcast their revoked state(s) on
chain), except that our new EnforcingChannelKeys expects us to not
jump forward in time. Since it isn't too important that we punish
our counterparty in such a corner-case, we opt to just close the
channel in such a case and move on.
lightning/src/ln/channel.rs