core-lightning/lightningd
Rusty Russell 36b1cac6e6 lightningd: new state AWAITING_UNILATERAL.
When in this state, we send a canned error "Awaiting unilateral close".
We enter this both when we drop to chain, and when we're trying to get
them to drop to chain due to option_data_loss_protect.

As this state (unlike channel errors) is saved to the database, it means
we will *never* talk to a peer again in this state, so they can't
confuse us.

Since we set this state in channel_fail_permanent() (which is the only
place we call drop_to_chain for a unilateral close), we don't need to
save to the db: channel_set_state() does that for us.

This state change has a subtle effect: we return WIRE_UNKNOWN_NEXT_PEER
instead of WIRE_TEMPORARY_CHANNEL_FAILURE as soon as we get a failure
with a peer.  To provoke a temporary failure in test_pay_disconnect we
take the node offline.

Reported-by: Christian Decker @cdecker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-08-23 14:46:22 +02:00
..
test param: remove old callback code 2018-08-20 01:02:25 +00:00
.gitignore
bitcoind.c bitcoind: don't use double in extracting feerate. 2018-08-22 12:13:23 +02:00
bitcoind.h bitcoind: fix spurious memleak reports. 2018-06-15 11:53:47 +02:00
chaintopology.c chaintopology: always cap max block to bitcoind's block height. 2018-08-21 01:00:37 +02:00
chaintopology.h improves exponential smoothing of feerate estimates (#1699) 2018-07-15 18:30:43 +02:00
channel_control.c lightningd: new state AWAITING_UNILATERAL. 2018-08-23 14:46:22 +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
channel.c lightningd: new state AWAITING_UNILATERAL. 2018-08-23 14:46:22 +02:00
channel.h db: store claimed per_commitment_point from option_data_loss_protect. 2018-08-23 14:46:22 +02:00
closing_control.c connectd: rely on the master to tell us to reconnect. 2018-08-09 19:44:27 +02:00
closing_control.h
connect_control.c param: remove old callback code 2018-08-20 01:02:25 +00:00
connect_control.h connectd: remove separate address hint message. 2018-08-09 19:44:27 +02:00
gossip_control.c param: remove old callback code 2018-08-20 01:02:25 +00: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 lightningd: display all addresses in listnodes. 2018-08-06 19:33:46 +02:00
gossip_msg.h gossipd: add flag for locally disabling channel. 2018-07-27 14:12:00 +02:00
hsm_control.c lightningd: get basepoints from hsmd, don't ever get seed. 2018-07-24 00:40:01 +02:00
hsm_control.h hsmd: fix missing status messages. 2018-07-17 12:32:00 +02:00
htlc_end.c
htlc_end.h
invoice.c param: remove old callback code 2018-08-20 01:02:25 +00:00
invoice.h
json.c param: upgraded json_tok_short_channel_id 2018-08-20 01:02:25 +00:00
json.h param: upgraded json_tok_short_channel_id 2018-08-20 01:02:25 +00:00
jsonrpc_errors.h renamed error code 2018-07-29 16:27:38 +02:00
jsonrpc.c param: remove old callback code 2018-08-20 01:02:25 +00:00
jsonrpc.h param: upgraded json_tok_newaddr 2018-08-20 01:02:25 +00:00
lightningd.c openingd: take peer before we're opening, wait for explicit funding msg. 2018-08-09 19:44:27 +02:00
lightningd.h openingd: take peer before we're opening, wait for explicit funding msg. 2018-08-09 19:44:27 +02:00
log_status.c Remove tal_len, use tal_count() or tal_bytelen(). 2018-07-30 11:31:17 +02:00
log_status.h
log.c log: Append the current time to the crash log filename 2018-08-23 12:51:08 +02:00
log.h param: upgraded json_tok_loglevel 2018-08-20 01:02:25 +00:00
Makefile ping: no longer a dev_ command. 2018-08-10 12:46:45 +02:00
memdump.c Use snprintf(...) instead of sprintf(...) 2018-08-02 16:14:21 +09:30
onchain_control.c onchaind: use a point-of-last-resort if we see an unknown transaction. 2018-08-23 14:46:22 +02:00
onchain_control.h
opening_control.c db: store claimed per_commitment_point from option_data_loss_protect. 2018-08-23 14:46:22 +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 param: remove old callback code 2018-08-20 01:02:25 +00:00
options.h
param.c param: remove old callback code 2018-08-20 01:02:25 +00:00
param.h param: remove old callback code 2018-08-20 01:02:25 +00:00
pay.c param: remove old callback code 2018-08-20 01:02:25 +00:00
pay.h pay: Pass description to send_payment 2018-07-30 03:04:45 +00:00
payalgo.c param: remove old callback code 2018-08-20 01:02:25 +00:00
payalgo.h
peer_control.c lightningd: new state AWAITING_UNILATERAL. 2018-08-23 14:46:22 +02:00
peer_control.h openingd: take peer before we're opening, wait for explicit funding msg. 2018-08-09 19:44:27 +02:00
peer_htlcs.c lightningd: update feerate upon receiving revoke_and_ack from fundee. 2018-08-22 18:54:53 +02:00
peer_htlcs.h channel_control: Forget if unconfirmed for a long time and we are fundee. 2018-05-23 14:37:32 -07:00
ping.c param: remove old callback code 2018-08-20 01:02:25 +00:00
subd.c lightningd: don't dump core on subdaemon failure. 2018-08-05 02:03:58 +00:00
subd.h hsmd: fix missing status messages. 2018-07-17 12:32:00 +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