rgb-cln/lightningd
Rusty Russell 86c28b2272 channeld: channel drain mitigation.
Add new check if we're funder trying to add HTLC, keeping us
with enough extra funds to pay for another HTLC the peer might add.

We also need to adjust the spendable_msat calculation, and update
various tests which try to unbalance channels.  We eliminate
the now-redundant test_channel_drainage entirely.

Changelog-Fixed: Corner case where channel could become unusable (https://github.com/lightningnetwork/lightning-rfc/issues/728)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-02-11 15:34:05 +01:00
..
test plugin: Include featurebits registered by plugins in invoices 2020-02-11 13:53:31 +10:30
.gitignore
Makefile common: move json_stream from lightningd/ to common/ 2020-02-04 13:24:32 +10:30
bitcoind.c
bitcoind.h
chaintopology.c
chaintopology.h
channel.c
channel.h
channel_control.c channel control: check that peer is connected before canceling 2020-02-10 15:59:26 +10:30
channel_control.h channel control: break out separate method for canceling 2020-02-10 15:59:26 +10:30
channel_state.h
closing_control.c
closing_control.h
connect_control.c connectd: Pass the init_featurebits down to connectd and use in init 2020-02-11 13:53:31 +10:30
connect_control.h
gossip_control.c plugin: Add featurebits registered by plugins to node_announcements 2020-02-11 13:53:31 +10:30
gossip_control.h
gossip_msg.c
gossip_msg.h
hsm_control.c
hsm_control.h
htlc_end.c
htlc_end.h
htlc_set.c Makefile: update bolt markers which have been since merged. 2020-01-31 06:07:56 +00:00
htlc_set.h
invoice.c plugin: Introduce plugin type to allow singleton and chaining 2020-02-11 15:57:22 +10:30
invoice.h
io_loop_with_timers.c
io_loop_with_timers.h
json.c common: move json_stream helpers to common/json 2020-02-04 13:24:32 +10:30
json.h common: move json_stream helpers to common/json 2020-02-04 13:24:32 +10:30
jsonrpc.c plugin: Introduce plugin type to allow singleton and chaining 2020-02-11 15:57:22 +10:30
jsonrpc.h common: move json_stream from lightningd/ to common/ 2020-02-04 13:24:32 +10:30
lightningd.c lightningd: Added --subdaemon command to allow alternate subdaemons. 2020-02-04 10:44:13 +10:30
lightningd.h lightningd: Added --subdaemon command to allow alternate subdaemons. 2020-02-04 10:44:13 +10:30
log.c
log.h
log_status.c
log_status.h
memdump.c
memdump.h
notification.c
notification.h
onchain_control.c
onchain_control.h
opening_control.c plugin: Introduce plugin type to allow singleton and chaining 2020-02-11 15:57:22 +10:30
opening_control.h
options.c lightningd: Added --subdaemon command to allow alternate subdaemons. 2020-02-04 10:44:13 +10:30
options.h
pay.c lightningd: fix wrong command in response message 2020-02-03 15:38:11 +00:00
pay.h
peer_control.c channeld: channel drain mitigation. 2020-02-11 15:34:05 +01:00
peer_control.h
peer_htlcs.c plugin: Allow multiple plugins to register the `htlc_accepted` hook 2020-02-11 15:57:22 +10:30
peer_htlcs.h
ping.c
ping.h
plugin.c plugin: Allow custom features only if the plugin is not dynamic 2020-02-11 13:53:31 +10:30
plugin.h plugin: Add function to collect featurebits that plugins registered 2020-02-11 13:53:31 +10:30
plugin_control.c lightningd/plugin: unregister a plugin's options when stopping it 2020-02-10 09:49:15 +10:30
plugin_control.h
plugin_hook.c plugin: Remove special case for plugin stopping while handling hooks 2020-02-11 15:57:22 +10:30
plugin_hook.h plugin: Multiple plugins can register a singl hook 2020-02-11 15:57:22 +10:30
signmessage.c
subd.c lightningd: Added --subdaemon command to allow alternate subdaemons. 2020-02-04 10:44:13 +10:30
subd.h
watch.c
watch.h