cln/lightningd
Rusty Russell c2b357b916 lightningd: wrap htlc replay in a database transaction.
AFAICT this only "worked" previously because replay htlc simply failed
them all (no peers are currently connected).  With upcoming changes
(foreshadowed by the comment) this is no longer true:

Attempting to prepare a db_stmt outside of a transaction: wallet/invoices.c:373
lightningd: FATAL SIGNAL 6 (version v0.7.3-188-g45b0af4-modded)
0x55b475590a73 send_backtrace
	common/daemon.c:41
0x55b475590b1d crashdump
	common/daemon.c:54
0x7f16c557b46f ???
	???:0
0x7f16c557b3eb ???
	???:0
0x7f16c555a898 ???
	???:0
0x55b475564c8f fatal
	lightningd/log.c:814
0x55b4755c3ed5 db_prepare_v2_
	wallet/db.c:605
0x55b4755c76b5 invoices_find_unpaid
	wallet/invoices.c:373
0x55b4755ce91c wallet_invoice_find_unpaid
	wallet/wallet.c:1990
0x55b47555861f invoice_check_payment
	lightningd/invoice.c:257
0x55b475557a7c htlc_add_set
	lightningd/htlc_set.c:112
0x55b47557b294 handle_localpay
	lightningd/peer_htlcs.c:332
0x55b47557c63c htlc_accepted_hook_callback
	lightningd/peer_htlcs.c:857
0x55b475585573 plugin_hook_call_
	lightningd/plugin_hook.c:118
0x55b47557c747 plugin_hook_call_htlc_accepted
	lightningd/peer_htlcs.c:882
0x55b47557ca3e peer_accepted_htlc
	lightningd/peer_htlcs.c:991
0x55b47557ffb9 htlcs_resubmit
	lightningd/peer_htlcs.c:2131
0x55b4755620f7 main
	lightningd/lightningd.c:801

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-12-12 15:03:53 +01:00
..
test htlcs: remove origin_htlc_id from htlc_out. 2019-12-12 15:03:53 +01:00
.gitignore handshaked: remove. 2017-10-20 18:31:32 +02:00
bitcoind.c lightningd: don't start if bitcoind is behind. 2019-11-21 05:18:29 +00:00
bitcoind.h bitcoind: remove the chainparams member 2019-11-15 13:14:08 +01:00
chaintopology.c lightningd: don't start if bitcoind is behind. 2019-11-21 05:18:29 +00:00
chaintopology.h lightningd: add flag for whether we're synced, and callback infrastructure. 2019-08-10 22:09:09 +02:00
channel.c logging: remove spaces from subsystem names. 2019-11-18 04:50:22 +00:00
channel.h TAGS: reformat to fix when PRINTF_FMT() used. 2019-11-01 17:27:20 -05:00
channel_control.c Spec: trivial update to latest. 2019-11-24 23:33:17 +00:00
channel_control.h API: fundchannel_cancel can cancel fundchannel process before funding broadcast 2019-09-11 17:04:14 -05:00
channel_state.h wallet: Add a final CLOSED state to channels 2019-06-30 16:41:30 +09:30
closing_control.c lightningd: have optional node_id associated with subdaemons. 2019-11-18 04:50:22 +00:00
closing_control.h common/per_per_state: generalize lightningd/peer_comm Part 1 2019-06-04 01:29:39 +00:00
connect_control.c connectd: add network to init message 2019-11-29 21:17:08 +01:00
connect_control.h Use node_id everywhere for nodes. 2019-04-09 12:37:16 -07:00
gossip_control.c lightningd: expose/accept "style" parameter in routes. 2019-11-14 10:15:33 +01:00
gossip_control.h gossipd: get fed the blockheight from lightningd when we know it. 2019-09-25 04:01:56 +00:00
gossip_msg.c gossipd: add hop-style to nodes to mark whether they speak TLV onion. 2019-11-14 10:15:33 +01:00
gossip_msg.h common/features: only support a single feature bitset. 2019-10-11 02:52:04 +00:00
hsm_control.c bitcoind: remove the chainparams member 2019-11-15 13:14:08 +01:00
hsm_control.h Use node_id everywhere for nodes. 2019-04-09 12:37:16 -07:00
htlc_end.c htlcs: remove origin_htlc_id from htlc_out. 2019-12-12 15:03:53 +01:00
htlc_end.h htlcs: remove origin_htlc_id from htlc_out. 2019-12-12 15:03:53 +01:00
htlc_set.c lightningd: implement htlc sets. 2019-12-12 15:03:53 +01:00
htlc_set.h lightningd: implement htlc sets. 2019-12-12 15:03:53 +01:00
invoice.c lightningd: split invoice check into separate function. 2019-12-12 15:03:53 +01:00
invoice.h lightningd: split invoice check into separate function. 2019-12-12 15:03:53 +01:00
io_loop_with_timers.c plugins: don't crash if getmanifest times out. 2019-07-24 16:16:53 +02:00
io_loop_with_timers.h lightningd/io_loop_with_timers.c: Move mainloop to its own source file, have chaintopology use it. 2019-05-31 17:57:10 +02:00
json.c Init commit to be able to create a tor static service on the fly. 2019-12-03 23:35:18 +01:00
json.h jsonrpc: Add json_add_preimage helper 2019-12-03 01:16:07 +00:00
json_stream.c lightningd: have logging include an optional node_id for each entry. 2019-11-18 04:50:22 +00:00
json_stream.h TAGS: reformat to fix when PRINTF_FMT() used. 2019-11-01 17:27:20 -05:00
jsonrpc.c lightningd: make sure rpc_command replacement is well-formed. 2019-12-07 21:26:31 +01:00
jsonrpc.h common/memleak: add dynamic hooks for assisting memleak. 2019-09-06 14:35:01 +02:00
lightningd.c lightningd: wrap htlc replay in a database transaction. 2019-12-12 15:03:53 +01:00
lightningd.h lightningd: implement htlc sets. 2019-12-12 15:03:53 +01:00
log.c log: print UNUSUAL messages before log initialization too. 2019-11-23 22:42:34 +00:00
log.h lightningd: use a simple array for less memory usage. 2019-11-18 04:50:22 +00:00
log_status.c lightningd: kill per-peer daemons if they claim a different peer id. 2019-11-18 04:50:22 +00:00
log_status.h lightningd: have logging include an optional node_id for each entry. 2019-11-18 04:50:22 +00:00
Makefile lightningd: implement htlc sets. 2019-12-12 15:03:53 +01:00
memdump.c common/memleak: add dynamic hooks for assisting memleak. 2019-09-06 14:35:01 +02:00
memdump.h lightningd: add code to search strmaps for memleak detection. 2019-02-07 20:33:50 +00:00
notification.c plugin: Another new notification type, 'sendpay_failure' 2019-09-11 00:57:39 +00:00
notification.h plugin: Another new notification type, 'sendpay_failure' 2019-09-11 00:57:39 +00:00
onchain_control.c lightningd: have optional node_id associated with subdaemons. 2019-11-18 04:50:22 +00:00
onchain_control.h onchaind: Replay stored channeltxs to restore onchaind state 2018-04-25 14:33:38 +02:00
opening_control.c lightningd: don't use chainparams before param() call in json_fund_channel_start 2019-11-23 22:42:34 +00:00
opening_control.h common/per_per_state: generalize lightningd/peer_comm Part 1 2019-06-04 01:29:39 +00:00
options.c Init commit to be able to create a tor static service on the fly. 2019-12-03 23:35:18 +01:00
options.h common: parse --allow-deprecated-apis extremely early. 2019-11-23 22:42:34 +00:00
pay.c doc: update experimental bolt version quotes. 2019-12-12 15:03:53 +01:00
pay.h db: add partid, total_msat fields to payment entries. 2019-12-12 15:03:53 +01:00
peer_control.c htlcs: remove origin_htlc_id from htlc_out. 2019-12-12 15:03:53 +01:00
peer_control.h lightningd: remove per-peer log book. 2019-11-18 04:50:22 +00:00
peer_htlcs.c lightningd: cleanup redundant args from handle_localpay 2019-12-12 15:03:53 +01:00
peer_htlcs.h htlcs: remove origin_htlc_id from htlc_out. 2019-12-12 15:03:53 +01:00
ping.c bolt: update to BOLT spec changes (extract format + type specifications) 2019-07-16 06:10:58 +00:00
ping.h ping: complete JSON RPC ping commands even if one ping gets no response. 2018-09-14 22:11:23 +02:00
plugin.c plugin: handle corner case where rpc_command is to stop the plugin. 2019-12-06 16:52:16 +01:00
plugin.h plugin: handle corner case where rpc_command is to stop the plugin. 2019-12-06 16:52:16 +01:00
plugin_control.c plugin_control: halve the timeout delay 2019-10-11 10:05:08 -05:00
plugin_control.h plugins: cleanup shared headers between dynamic and static plugins 2019-09-30 00:20:16 +00:00
plugin_hook.c plugin: handle corner case where rpc_command is to stop the plugin. 2019-12-06 16:52:16 +01:00
plugin_hook.h lightningd/plugin_hook: make it possible to unregister a hook 2019-07-28 07:24:04 +00:00
signmessage.c lightningd: checkmessage can intuit pubkey in some cases. 2019-10-14 18:58:44 -05:00
subd.c lightningd: enable io logging on subdaemons iff we're going to print it. 2019-11-18 04:50:22 +00:00
subd.h lightningd: have optional node_id associated with subdaemons. 2019-11-18 04:50:22 +00:00
watch.c lightningd: fix occasional missing txid detection. 2019-06-28 03:31:43 +00:00
watch.h lightningd: fix occasional missing txid detection. 2019-06-28 03:31:43 +00:00