rgb-cln/channeld
Rusty Russell 1275928fa2 channeld: don't add HTLCs if that would drive us negative.
We track whether each change is affordable as we go;
test_channel_drainage got us so close that the difference mattered; we
hit an assert when we tried to commit the tx and realized we couldn't
afford it.

We should not be trying to add an HTLC if it will result in the funder
being unable to afford it on either the local *or remote* commitments.

Note the test still "fails" because it refuses to send the final
payment.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-06-11 23:19:11 +00:00
..
test channeld: extract HTLC trim logic into common. 2019-06-11 23:19:11 +00:00
Makefile channeld: extract HTLC trim logic into common. 2019-06-11 23:19:11 +00:00
channel_wire.csv lightningd/channel_control logline fixup 2019-06-07 10:34:34 +02:00
channeld.c channeld: don't add HTLCs if that would drive us negative. 2019-06-11 23:19:11 +00:00
channeld_htlc.h channeld: use amount_msat for struct htlc amount. 2019-02-21 08:01:37 +00:00
commit_tx.c channeld: extract HTLC trim logic into common. 2019-06-11 23:19:11 +00:00
commit_tx.h commit_tx & htlc_tx: use amount_sat/amount_msat. 2019-02-21 08:01:37 +00:00
full_channel.c channeld: don't add HTLCs if that would drive us negative. 2019-06-11 23:19:11 +00:00
full_channel.h feat: pass htlc amount exceeded to exception 2019-06-08 01:22:52 +00:00
full_channel_error.h channeld: map htlc add/remove errors to names. 2018-02-19 02:56:51 +00:00