core-lightning/lightningd
Christian Decker 79443d6f94 htlc: Defer saving the outgoing payment until we store the HTLC
This addresses a performance regression introduced by
6ceb375650. We were storing it in an
otherwise empty DB transaction, which means that DB transaction was no
longer a no-op. Now we defer storing until we need to store the
corresponding HTLC anyway, so we can just piggyback on top of that
transaction.

This is also more consistent since we'd be forgetting the payment
anyway if we restart between adding the HTLC and committing to it.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2017-11-23 23:45:28 +00:00
..
test feerate: use u32 everywhere. 2017-11-23 12:40:32 +01:00
.gitignore handshaked: remove. 2017-10-20 18:31:32 +02:00
bech32.c bech32: pull in bech32 sample code, almost untouched. 2017-11-01 01:09:23 +00:00
bech32.h bech32: pull in bech32 sample code, almost untouched. 2017-11-01 01:09:23 +00:00
bitcoind.c feerate: use u32 everywhere. 2017-11-23 12:40:32 +01:00
bitcoind.h feerate: use u32 everywhere. 2017-11-23 12:40:32 +01:00
bolt11.c bolt11: comment on weird assignment-then-check test. 2017-11-01 01:09:23 +00:00
bolt11.h bolt11: 'c' support for min_final_cltv_expiry. 2017-11-01 01:09:23 +00:00
build_utxos.c common: absorb remaining files from daemon/ 2017-08-29 17:54:14 +02:00
build_utxos.h common: move some files out of lightningd/ 2017-08-29 17:54:14 +02:00
chaintopology.c chaintopology: implement dev-setfees to force feerate changes. 2017-11-23 12:40:32 +01:00
chaintopology.h chaintopology: add notify_feerate_change() callback. 2017-11-23 12:40:32 +01:00
dev_ping.c subd: automatically detect if callback frees subd. 2017-10-20 18:31:32 +02:00
gossip_control.c gossipd: route correctly using final CLTV value. 2017-10-31 14:36:50 +01:00
gossip_control.h gossipd: rewrite to do the handshake internally. 2017-10-20 18:31:32 +02:00
gossip_msg.c ipaddr: rename to wireaddr. 2017-10-26 21:01:09 +00:00
gossip_msg.h ipaddr: rename to wireaddr. 2017-10-26 21:01:09 +00:00
hsm_control.c lightningd: fix typo in fatal error. 2017-10-25 18:34:35 +02:00
hsm_control.h lightningd/hsm_control: use a simple fd for HSM. 2017-06-27 10:25:53 +09:30
htlc_end.c htlc: Defer saving the outgoing payment until we store the HTLC 2017-11-23 23:45:28 +00:00
htlc_end.h htlc: Defer saving the outgoing payment until we store the HTLC 2017-11-23 23:45:28 +00:00
invoice.c invoice: don't allow payments in expired invoices. 2017-11-23 00:11:04 +01:00
invoice.h invoice: record expiry in data structure. 2017-11-23 00:11:04 +01:00
jsonrpc.c jsonrpc: wrap all calls in transaction. 2017-11-06 10:24:34 +01:00
jsonrpc.h ipaddr: rename to wireaddr. 2017-10-26 21:01:09 +00:00
lightningd.c lightningd: initialize dev_subdaemon_fail to false. 2017-11-22 19:40:46 +01:00
lightningd.h lightningd: remove --deadline-blocks option. 2017-11-03 05:18:49 +00:00
log.c dev: option not to do backtracing. 2017-10-31 04:14:33 +00:00
log.h dev: option not to do backtracing. 2017-10-31 04:14:33 +00:00
Makefile bolt11: support for encoding/decoding and checking. 2017-11-01 01:09:23 +00:00
netaddress.c type_to_string: format wireaddr. 2017-10-26 21:01:09 +00:00
netaddress.h ipaddr: rename to wireaddr. 2017-10-26 21:01:09 +00:00
opt_time.c common: absorb remaining files from daemon/ 2017-08-29 17:54:14 +02:00
opt_time.h headers: fix up header idempotent lines. 2017-08-29 17:54:14 +02:00
options.c feerate: use u32 everywhere. 2017-11-23 12:40:32 +01:00
options.h ipaddr: rename to wireaddr. 2017-10-26 21:01:09 +00:00
pay.c htlc: Defer saving the outgoing payment until we store the HTLC 2017-11-23 23:45:28 +00:00
pay.h lightningd: unify pay vs forward path when handling failures. 2017-06-23 09:29:42 +09:30
peer_control.c channeld: send update_fee messages. 2017-11-23 12:40:32 +01:00
peer_control.h channeld: send update_fee messages. 2017-11-23 12:40:32 +01:00
peer_htlcs.c htlc: Defer saving the outgoing payment until we store the HTLC 2017-11-23 23:45:28 +00:00
peer_htlcs.h htlc: Defer saving the outgoing payment until we store the HTLC 2017-11-23 23:45:28 +00:00
peer_state.h gossipd: rewrite to do the handshake internally. 2017-10-20 18:31:32 +02:00
subd.c subd: wrap all message callbacks in a transaction. 2017-11-06 10:24:34 +01:00
subd.h subd: wrap all message callbacks in a transaction. 2017-11-06 10:24:34 +01:00
watch.c watch: remove peer_debug helper. 2017-09-28 13:07:05 +09:30
watch.h lightningd: remove lightningd_state. 2017-08-29 17:54:14 +02:00