core-lightning/lightningd
Rusty Russell 517828adb2 lightningd: don't print nasty message when onchaind fails partially-failed HTLC
1. We set an outgoing htlc's `failonion` when we get a commitment_signed.
2. We don't transfer it to the corresponding incoming HTLC until we send
   commitment_signed and receive revoke_and_ack (meaning, outgoing htlc is
   completely dead).
3. If between these steps we go onchain, onchaind (after 3 blocks) tells us
   to fail the HTLC.
4. hout->failonion is set, but hout->hin has not been failed yet.  We
   do a sanity check and print a nasty message, and fail it with
   WIRE_PERMANENT_CHANNEL_FAILURE instead of relaying the error.

So handle this case explicitly.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-06-27 17:21:35 +09:30
..
test json: fix up msat amounts in non-_msat fields. 2022-06-21 06:52:35 +09:30
.gitignore Ignore all the deamon inside the git history 2021-10-28 15:51:38 +02:00
bitcoind.c database: pull out database code into a new module 2022-03-05 15:03:34 +10:30
bitcoind.h common: use bitcoin_outpoint. 2021-10-15 12:09:36 +02:00
chaintopology.c database: pull out database code into a new module 2022-03-05 15:03:34 +10:30
chaintopology.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
channel_control.c doc: big BOLT update to incorporate warnings language. 2022-04-02 09:40:18 +10:30
channel_control.h lightningd: handle reestablish directly from connectd. 2022-03-23 13:20:12 +10:30
channel_state.h
channel.c lightningd: don't tell connectd to discard peer unless no subds left. 2022-03-23 13:20:12 +10:30
channel.h lightningd: use a better channel if available to next hop. 2022-03-23 13:20:12 +10:30
closing_control.c shutdown: don't allow shutdown to p2pkh or p2sh addresses for anchor outputs. 2022-04-02 09:40:18 +10:30
closing_control.h patch lightningd-peer-fds.patch 2022-01-20 15:24:06 +10:30
coin_mvts.c balance_snapshot: don't count unconfirmed utxos 2022-03-05 15:12:12 +10:30
coin_mvts.h coin_mvt: tiny, dont import lightningd header 2022-02-07 13:02:09 +10:30
connect_control.c connectd: remove enable-autotor-v2-mode option 2022-05-18 10:15:36 +09:30
connect_control.h lightningd: don't tell connectd to discard peer unless no subds left. 2022-03-23 13:20:12 +10:30
datastore.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
dual_open_control.c lease_rates: prepare for msats fields as raw numbers. 2022-06-21 06:52:35 +09:30
dual_open_control.h connectd: hold peer until we're interested. 2022-03-23 13:20:12 +10:30
gossip_control.c lease_rates: prepare for msats fields as raw numbers. 2022-06-21 06:52:35 +09:30
gossip_control.h connectd: remove second gossip fd. 2022-02-08 11:15:52 +10:30
hsm_control.c cli: make the command line more user friendly. 2022-03-24 09:53:38 +10:30
hsm_control.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
htlc_end.c lightningd: fix overzealous check in htlc_out_check: 2022-04-20 16:30:05 +09:30
htlc_end.h coin_mvt: record fees for an outbound htlc 2021-12-28 04:42:42 +10:30
htlc_set.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
htlc_set.h
invoice.c lightningd: change msatoshi args to amount_msat. 2022-06-21 06:52:35 +09:30
invoice.h
io_loop_with_timers.c database: pull out database code into a new module 2022-03-05 15:03:34 +10:30
io_loop_with_timers.h
json.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
json.h
jsonrpc.c lightningd: fix outgoing IO logging for JSONRPC. 2022-06-21 06:52:35 +09:30
jsonrpc.h lightningd: cleanup, freeing jsonrpc in shutdown cannot trigger db write's anymore 2021-11-30 13:34:44 +10:30
lightningd.c lightningd: multiple log-file options allow more than one log output. 2022-06-27 17:21:35 +09:30
lightningd.h lightningd: multiple log-file options allow more than one log output. 2022-06-27 17:21:35 +09:30
log_status.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
log_status.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
log.c lightningd: multiple log-file options allow more than one log output. 2022-06-27 17:21:35 +09:30
log.h db: decouple fatal reliance, have as impl defined function 2022-03-05 15:03:34 +10:30
Makefile channeld: take over gossip_rcvd_filter.c and is_msg_gossip_broadcast. 2022-06-17 14:14:02 +09:30
memdump.c memleak: fix double-free if we timeout. 2022-03-23 13:20:12 +10:30
memdump.h lightningd: simplify memleak code. 2022-03-10 09:40:09 +10:30
notification.c coinmvt: don't use msats in fields not called "_msat". 2022-06-21 06:52:35 +09:30
notification.h lightningd: add "style" to listforwards. 2022-03-31 19:38:05 +10:30
offer.c Changed external/libwally-core to test_build_fix 2022-04-12 15:17:52 +09:30
onchain_control.c lightningd: extra sanity checks and rescue attempts for missing HTLCs. 2022-03-31 13:40:27 +10:30
onchain_control.h onchaind: remove 'is_replay' logic 2021-12-28 04:42:42 +10:30
onion_message.c connectd: restore obs2 onion support. 2022-03-29 10:55:12 +10:30
onion_message.h common: remove support for pre v0.10.2 onionmessages. 2021-12-01 05:44:28 +10:30
opening_common.c config: adds htlc_minimum_msat htlc_maximum_msat announce_discovered_ip 2022-04-05 05:45:04 +09:30
opening_common.h lightningd: handle reestablish directly from connectd. 2022-03-23 13:20:12 +10:30
opening_control.c json: fix up msat amounts in non-_msat fields. 2022-06-21 06:52:35 +09:30
opening_control.h connectd: hold peer until we're interested. 2022-03-23 13:20:12 +10:30
options.c lightningd: multiple log-file options allow more than one log output. 2022-06-27 17:21:35 +09:30
options.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
pay.c lightningd: deprecate msatoshi in sendpay route. 2022-06-21 06:52:35 +09:30
pay.h lightningd: use our cached channel_update for errors instead of asking gossipd. 2022-02-08 11:15:52 +10:30
peer_control.c lightningd: remove overzealous assertion. 2022-06-24 10:16:18 +09:30
peer_control.h jsonrpc: adds optional remote_addr to listpeers 2022-06-17 20:30:16 +09:30
peer_fd.c subdaemons: remove gossipd fd from per-peer daemons. 2022-02-08 11:15:52 +10:30
peer_fd.h subdaemons: remove gossipd fd from per-peer daemons. 2022-02-08 11:15:52 +10:30
peer_htlcs.c lightningd: don't print nasty message when onchaind fails partially-failed HTLC 2022-06-27 17:21:35 +09:30
peer_htlcs.h lightningd: extra sanity checks and rescue attempts for missing HTLCs. 2022-03-31 13:40:27 +10:30
ping.c connectd: handle pings and pongs. 2022-02-08 11:15:52 +10:30
plugin_control.c lightning-cli plugin start - Assume default relative path 2022-06-17 14:18:48 +09:30
plugin_control.h plugins: add command field to subcommand output. 2021-06-25 09:49:33 +09:30
plugin_hook.c database: pull out database code into a new module 2022-03-05 15:03:34 +10:30
plugin_hook.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
plugin.c lightningd: don't add null for unset plugin options. 2022-06-21 06:52:35 +09:30
plugin.h lightningd: cleanup obsolete plugins->shutdown flag 2021-12-14 09:33:10 +10:30
routehint.c lightningd: don't assume a single channel per peer. 2022-03-23 13:20:12 +10:30
routehint.h invoice: overhaul routehints to use topology.listincoming, cleanup. 2021-06-16 10:29:17 +09:30
signmessage.c signmessage: improve the UX of the rpc command when zbase is not a valid one 2022-06-24 14:02:04 +09:30
subd.c subd: make channel/peer own the subd. 2022-03-30 06:27:52 +10:30
subd.h subd: make channel/peer own the subd. 2022-03-30 06:27:52 +10:30
watch.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
watch.h common: use bitcoin_outpoint. 2021-10-15 12:09:36 +02:00