]> git.bitcoin.ninja Git - rust-lightning/commit
Fix handling of inbound uncommitted feerate updates
authorMatt Corallo <git@bluematt.me>
Mon, 12 Jul 2021 15:39:27 +0000 (15:39 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 13 Aug 2021 21:54:50 +0000 (21:54 +0000)
commitb3d0a8dd4e16b7ea89a53096d22a631959aa622f
tree9031920e0fd141b8e7e15db75383aed878926424
parent9d49c5c1a174bf807ed04421f0f08578b569448c
Fix handling of inbound uncommitted feerate updates

If we receive an update_fee but do not receive a commitment_signed,
we should not persist the pending fee update to disk or hold on to
it after our peer disconnects.

In order to make the code the most readable, we add a state enum
which matches the relevant states from InboundHTLCState, allowing
for more simple code comparison between inbound HTLC handling and
update_fee handling.
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channel.rs