Remove bogus mon_update_id += 1 fulfilling already-fulfilled HTLCs
authorMatt Corallo <git@bluematt.me>
Thu, 19 Mar 2020 01:10:22 +0000 (21:10 -0400)
committerMatt Corallo <git@bluematt.me>
Thu, 19 Mar 2020 23:20:27 +0000 (19:20 -0400)
commit32d62ada96faab954bbcee4fc5d9ec58d2eff482
tree368231507c96274f215d8201550a3be1566e4d89
parent082b72065ed3d230753a74db3972dce49e645e73
Remove bogus mon_update_id += 1 fulfilling already-fulfilled HTLCs

If we call get_update_fulfill_htlc (in this case via
ChannelManager::claim_funds_internal ->
Channel::get_update_fulfill_htlc_and_commit) and it finds that we
already have a holding-cell pending HTLC claim, it will return no
monitor update but leave latest_monitor_update_id incremented.

If we later go and add a new monitor update we'll panic as the
updates appear to have been applied out-of-order.
lightning/src/ln/channel.rs