rgb-cln/lightningd
Rusty Russell 1e467bb986 lightningd: fail HTLCs which are in-transit as we shut down.
This is the source of failure in the test_restart_many_payments stress
test: we don't commit the outgoing HTLC immediately, instead waiting for
gossip to tell us the peer for the outgoing channel, then waiting for
that channeld to tell is it's committed.  The result was incoming HTLCs
with no outgoing.

I initially pushed the HTLCs through that same path, but of course
(since peers are not connected yet!) the only result was that we failed
these HTLCs immediately.  So I chose the far simpler course of just
failing them directly.

To reproduce this, I had to increase the test_restart_many_payments
num to 10, and run it with nice -20 taskset -c 0.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-10-10 18:14:13 +02:00
..
test gossipd: parse and respect optional `htlc_maximum_msat` 2018-10-09 23:22:52 +00:00
.gitignore handshaked: remove. 2017-10-20 18:31:32 +02:00
Makefile hsmd: rename hsm_client_wire_csv to hsm_wire.csv 2018-09-20 09:49:39 +02:00
bitcoind.c lightningd: reduce log spam from bitcoin-cli invocations. 2018-10-10 06:10:42 +00:00
bitcoind.h lightningd: allow more than one bitcoind request at once, run multiple queues. 2018-09-19 13:21:21 +02:00
chaintopology.c common/utils.h: add tal_arr_expand helper. 2018-09-27 22:57:19 +02:00
chaintopology.h chaintopology: remove redundant wallet pointer. 2018-09-03 05:01:40 +00:00
channel.c json-invoice: add routeboost, warnings. 2018-09-28 15:03:42 +02:00
channel.h json-invoice: add routeboost, warnings. 2018-09-28 15:03:42 +02:00
channel_control.c common/utils.h: add tal_arr_expand helper. 2018-09-27 22:57:19 +02:00
channel_control.h lightningd: peer_start_channeld always returns true; make it void. 2018-08-10 12:46:45 +02:00
channel_state.h lightningd: new state AWAITING_UNILATERAL. 2018-08-23 14:46:22 +02:00
closing_control.c feerate: include rough estimates of actual tx costs. 2018-08-25 00:33:12 +00:00
closing_control.h gossipd: drain fd instead of passing around gossip index. 2018-04-26 05:47:57 +00:00
connect_control.c Use localfeatures and globalfeatures consistently. 2018-09-28 04:14:28 +00:00
connect_control.h connectd: remove separate address hint message. 2018-08-09 19:44:27 +02:00
gossip_control.c gossipd: use array[32] not pointer for alias. 2018-09-28 18:20:17 +02:00
gossip_control.h connectd: wean off gossip_wire message types, use our own. 2018-07-25 02:13:52 +00:00
gossip_msg.c gossipd: clean up getnodes handling. 2018-10-09 08:40:52 +00:00
gossip_msg.h gossipd: clean up getnodes handling. 2018-10-09 08:40:52 +00:00
hsm_control.c lightningd: use hsm_get_client_fd() helper for global daemons too. 2018-09-20 09:49:39 +02:00
hsm_control.h lightningd: use hsm_get_client_fd() helper for global daemons too. 2018-09-20 09:49:39 +02:00
htlc_end.c htlc: rename local flag to am_origin, add FIXME. 2018-10-09 23:17:54 +00:00
htlc_end.h htlc: rename local flag to am_origin, add FIXME. 2018-10-09 23:17:54 +00:00
invoice.c json-invoice: add routeboost, warnings. 2018-09-28 15:03:42 +02:00
invoice.h invoices: Extensive reorganization of invoice system. 2018-01-16 13:03:54 +01:00
json.c json-rpc: Remove upper limit for percentage 2018-09-20 02:41:28 +00:00
json.h param: added json_tok_string 2018-09-03 00:40:27 +00:00
jsonrpc.c rpc: add json_add_help_command for help command objects 2018-10-10 06:09:29 +00:00
jsonrpc.h json-invoice: add routeboost, warnings. 2018-09-28 15:03:42 +02:00
jsonrpc_errors.h renamed error code 2018-07-29 16:27:38 +02:00
lightningd.c common/utils.h: add tal_arr_expand helper. 2018-09-27 22:57:19 +02:00
lightningd.h ping: complete JSON RPC ping commands even if one ping gets no response. 2018-09-14 22:11:23 +02:00
log.c add "io" to -log-level usage 2018-09-14 22:12:13 +02:00
log.h param: upgraded json_tok_loglevel 2018-08-20 01:02:25 +00:00
log_status.c Remove tal_len, use tal_count() or tal_bytelen(). 2018-07-30 11:31:17 +02:00
log_status.h status: add multiple levels of logging. 2018-02-07 00:46:49 +00:00
memdump.c param: call param() all the time 2018-09-25 15:11:45 +02:00
onchain_control.c hsmd: rename hsm_client_wire_csv to hsm_wire.csv 2018-09-20 09:49:39 +02:00
onchain_control.h onchaind: Replay stored channeltxs to restore onchaind state 2018-04-25 14:33:38 +02:00
opening_control.c hsmd: rename hsm_client_wire_csv to hsm_wire.csv 2018-09-20 09:49:39 +02:00
opening_control.h connectd: rely on the master to tell us to reconnect. 2018-08-09 19:44:27 +02:00
options.c options: don't end default name with '-' in non-DEVELOPER mode. 2018-10-09 08:40:52 +00:00
options.h hsmd: drop newdir logic. 2018-05-05 17:55:10 +02:00
param.c common/utils.h: add tal_arr_expand helper. 2018-09-27 22:57:19 +02:00
param.h param: updated comments in the spirit of #1899 2018-09-03 00:40:27 +00:00
pay.c lightningd: fix inconsistency without COMPAT enabled. 2018-10-09 23:17:54 +00:00
pay.h pay: Pass description to send_payment 2018-07-30 03:04:45 +00:00
payalgo.c param: added json_tok_string 2018-09-03 00:40:27 +00:00
payalgo.h payalgo: New file for pay command. 2018-02-16 13:08:29 +01:00
peer_control.c json: use bolt naming for features arrays in listnodes, listpeers. 2018-09-28 04:14:28 +00:00
peer_control.h Use localfeatures and globalfeatures consistently. 2018-09-28 04:14:28 +00:00
peer_htlcs.c lightningd: fail HTLCs which are in-transit as we shut down. 2018-10-10 18:14:13 +02:00
peer_htlcs.h lightningd: move channel/peer/htlc load into own function. 2018-09-03 05:01:40 +00:00
ping.c ping: complete JSON RPC ping commands even if one ping gets no response. 2018-09-14 22:11:23 +02:00
ping.h ping: complete JSON RPC ping commands even if one ping gets no response. 2018-09-14 22:11:23 +02:00
subd.c lightningd: accept hsmstatus_client_bad_request messages (and log!) 2018-09-20 09:49:39 +02:00
subd.h lightningd: accept hsmstatus_client_bad_request messages (and log!) 2018-09-20 09:49:39 +02:00
watch.c txwatch: hand ld to callback, don't assume channel is non-NULL. 2018-08-21 00:48:02 +02:00
watch.h txwatch: hand ld to callback, don't assume channel is non-NULL. 2018-08-21 00:48:02 +02:00