rgb-cln/daemon
Rusty Russell 3f65f0f000 lightningd: fix up malformed onion handling.
In the case where we can't decrypt the onion, we can't fail it in the
normal way (which is encrypted using the onion shared secret), we need
to respond with a update_fail_malformed_htlc message.

Moreover, we need to remember this for persistence.  This means that
we really have three conclusions for an HTLC: fulfilled, failed,
malformed.  Fix up the logic everywhere which assumed failed or
fulfilled.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-06-23 09:29:42 +09:30
..
jsmn@bd9bd55c3a daemon/jsmn: Add submodule for jsmn. 2016-01-22 06:37:13 +10:30
test tests: run valgrind on children. 2017-04-12 09:09:19 -07:00
.gitignore daemon: first code. 2016-01-22 06:41:47 +10:30
Makefile lightningd: fix shachain to be 48-bits, with hack for legacy. 2017-04-01 23:59:46 +10:30
bitcoind.c logging: Removed automatic subprocess logging for bitcoind 2017-05-20 19:59:16 +09:30
bitcoind.h daemon/bitcoind: wean off struct lightningd_state. 2017-03-02 22:51:49 +10:30
broadcast.c broadcast: Implement replacing messages in the broadcast queue 2017-02-03 05:52:11 +10:30
broadcast.h broadcast: Implement replacing messages in the broadcast queue 2017-02-03 05:52:11 +10:30
chaintopology.c test_lightningd.py: helper to sync blockheight. 2017-05-02 11:46:46 +02:00
chaintopology.h struct topology -> struct chain_topology 2017-03-02 22:51:49 +10:30
channel.c daemon: disable old BOLT checks. 2017-01-04 14:09:20 +10:30
channel.h htlc: move enum side crom daemon/channel.h to daemon/htlc.h 2017-02-02 14:48:00 +10:30
commit_tx.c daemon/peer: move struct peer to internal header. 2017-03-02 22:51:49 +10:30
commit_tx.h htlc: move enum side crom daemon/channel.h to daemon/htlc.h 2017-02-02 14:48:00 +10:30
configdir.c config: different defaults for mainnet and testnet. 2016-10-07 14:00:18 +10:30
configdir.h config: different defaults for mainnet and testnet. 2016-10-07 14:00:18 +10:30
cryptopkt.c Fix a double-free bug in the negotiation phase 2017-04-24 05:17:13 +00:00
cryptopkt.h peer: do logging before crypto is on. 2016-08-31 16:06:31 +09:30
db.c daemon/peer: move struct peer to internal header. 2017-03-02 22:51:49 +10:30
db.h bitcoin/preimage: struct preimage. 2017-02-02 14:48:00 +10:30
dns.c dns: expose multiaddress connect code. 2017-05-25 14:24:47 +09:30
dns.h dns: expose multiaddress connect code. 2017-05-25 14:24:47 +09:30
failure.c Use global secp256k1_ctx instead of passing it around. 2016-12-02 18:12:58 +10:30
failure.h Use global secp256k1_ctx instead of passing it around. 2016-12-02 18:12:58 +10:30
feechange.c daemon/peer: move struct peer to internal header. 2017-03-02 22:51:49 +10:30
feechange.h Remove trailing whitespace from source. 2016-11-11 09:32:04 +10:30
feechange_state.h daemon: handle feechange requests. 2016-08-26 15:31:19 +09:30
htlc.c daemon/peer: move struct peer to internal header. 2017-03-02 22:51:49 +10:30
htlc.h lightningd: fix up malformed onion handling. 2017-06-23 09:29:42 +09:30
htlc_state.c daemon/htlc_state: split off from daemon/htlc. 2017-02-02 14:48:00 +10:30
htlc_state.h db.c: database API. 2016-08-18 14:25:13 +09:30
invoice.c daemon/invoice: wean off dstate (a little), link into new daemon. 2017-04-01 23:59:46 +10:30
invoice.h lightningd: peer_htlcs.c 2017-06-23 09:29:42 +09:30
irc_announce.c routing: Cleaning up old hostname and port handling 2017-05-10 12:37:44 +09:30
irc_announce.h routing: Added IRC announcement glue 2016-09-07 23:49:39 +02:00
json.c routing: Passing back all addresses on getnodes 2017-05-10 12:37:44 +09:30
json.h routing: Passing back all addresses on getnodes 2017-05-10 12:37:44 +09:30
jsonrpc.c daemon/chaintopology: use struct topology for more functions, not lightningd_state 2017-03-02 22:51:49 +10:30
jsonrpc.h jsonrpc: register base on linkage. 2017-01-04 14:08:15 +10:30
lightning-cli.c opt, utils: new arg for wrappers due to low-level tal change. 2016-11-09 18:56:38 +10:30
lightningd.c daemon/chaintopology.c: remove last remaining lightningd_state references. 2017-03-02 22:51:49 +10:30
lightningd.h routing: Add command line option to specify external IP address 2017-05-10 12:37:44 +09:30
log.c lightningd: fix logging of peer death. 2017-06-23 09:29:42 +09:30
log.h lightningd: fix logging of peer death. 2017-06-23 09:29:42 +09:30
names.c names: move into daemon/ 2016-11-09 08:04:27 +10:30
names.h names: move into daemon/ 2016-11-09 08:04:27 +10:30
netaddr.c utils: add tal_hex() helper. 2017-01-10 15:19:25 +10:30
netaddr.h peer: keep addresses separately from peers. 2016-08-18 14:25:14 +09:30
opt_time.c Remove trailing whitespace from source. 2016-11-11 09:32:04 +10:30
opt_time.h daemon: test restarting. 2016-08-18 14:25:14 +09:30
options.c routing: Add command line option to specify external IP address 2017-05-10 12:37:44 +09:30
options.h daemon/options: split option registration and parsing. 2017-02-24 16:22:56 +10:30
output_to_htlc.c daemon/peer: move struct peer to internal header. 2017-03-02 22:51:49 +10:30
output_to_htlc.h struct bitcoin_tx: remove explicit lengths, use tal_len()/tal_count() 2017-01-25 11:03:55 +10:30
p2p_announce.c Update to new spec: differentiate channel_id and short_channel_id. 2017-03-02 22:51:49 +10:30
p2p_announce.h refactor: Move the gossip handlers to routing 2017-02-03 05:52:11 +10:30
packets.c daemon/peer: move struct peer to internal header. 2017-03-02 22:51:49 +10:30
packets.h bitcoin/preimage: struct preimage. 2017-02-02 14:48:00 +10:30
pay.c daemon/sphinx: support modern v0 hop payload. 2017-04-01 23:59:46 +10:30
pay.h bitcoin/preimage: struct preimage. 2017-02-02 14:48:00 +10:30
peer.c daemon/dns: hand netaddr we connected to through to callback. 2017-05-25 14:24:47 +09:30
peer.h daemon/peer: move struct peer to internal header. 2017-03-02 22:51:49 +10:30
peer_internal.h daemon/peer: move struct peer to internal header. 2017-03-02 22:51:49 +10:30
pseudorand.c daemon/pseudorand: be more paranoid with isaac64 output. 2017-03-02 22:51:49 +10:30
pseudorand.h daemon: use siphash for hashes. 2016-07-01 12:00:17 +09:30
routing.c BOLT update for 8-byte satoshi values, and other updates. 2017-06-07 09:19:04 +09:30
routing.h wire: Correct the short channel id serialization to use 3+3+2 2017-05-20 20:01:34 +09:30
routingrpc.c routing: Cleaning up old hostname and port handling 2017-05-10 12:37:44 +09:30
secrets.c struct secret: use everywhere. 2017-05-09 11:43:35 +09:30
secrets.h bitcoin/signature.h: remove struct signature. 2017-01-25 11:03:55 +10:30
sphinx.c struct secret: use everywhere. 2017-05-09 11:43:35 +09:30
sphinx.h Massive BOLT text underscore and formatting updates. 2017-06-07 09:19:04 +09:30
state.h daemon: disable old BOLT checks. 2017-01-04 14:09:20 +10:30
state_types.h Remove trailing whitespace from source. 2016-11-11 09:32:04 +10:30
timeout.c refactor: Making timers independent of the lightningd_state 2017-02-21 17:59:34 +01:00
timeout.h refactor: Making timers independent of the lightningd_state 2017-02-21 17:59:34 +01:00
wallet.c struct secret: use everywhere. 2017-05-09 11:43:35 +09:30
wallet.h wallet: use pubkey as API, not pointer. 2016-11-09 08:04:28 +10:30
watch.c daemon/peer: move struct peer to internal header. 2017-03-02 22:51:49 +10:30
watch.h daemon/watch: fix macro clash. 2017-03-07 11:27:09 +10:30