]> git.bitcoin.ninja Git - rust-lightning/commit
Fix holding cell freeing in case we fail to add some HTLC 2019-01-holding-cell-limits
authorMatt Corallo <git@bluematt.me>
Mon, 21 Jan 2019 16:44:59 +0000 (11:44 -0500)
committerMatt Corallo <git@bluematt.me>
Fri, 25 Jan 2019 02:53:49 +0000 (21:53 -0500)
commitbf26056c8a7d44875e50364135a59410192c2fe1
tree8e1a26b231e0687e058e51e6d1cd3c33b4c9fd0c
parenta6f0281017f1223ef961fb3a000915e37b5719b0
Fix holding cell freeing in case we fail to add some HTLC

Previously, if we went to free the holding cell HTLC updates, and
adding one failed as we hit our outbound HTLC limit (or in-flight
value limit), we would not send a commitment_signed, leaving us in
an invalid state. We first fix that bug, and then refuse to add
things to our holding cell once we reach our limits considering the
holding cell, as we shouldn't have multiple commitment dance rounds
worth of HTLCs in the holding cell anyway.
src/ln/channel.rs
src/ln/functional_test_utils.rs
src/ln/functional_tests.rs