core-lightning/lightningd
Michael Schmoock 8a8dabaa58 feat: adds state change cause and message
This adds a `state_change` 'cause' to a channel.
A 'cause' is some initial 'reason' a channel was created or closed by:

  /* Anything other than the reasons below. Should not happen. */
  REASON_UNKNOWN,
  /* Unconscious internal reasons, e.g. dev fail of a channel. */
  REASON_LOCAL,
  /* The operator or a plugin opened or closed a channel by intention. */
  REASON_USER,
  /* The remote closed or funded a channel with us by intention. */
  REASON_REMOTE,
  /* E.g. We need to close a channel because of bad signatures and such. */
  REASON_PROTOCOL,
  /* A channel was closed onchain, while we were offline. */
  /* Note: This is very likely a conscious remote decision. */
  REASON_ONCHAIN

If a 'cause' is known and a subsequent state change is made with
`REASON_UNKNOWN` the preceding cause will be used as reason, since a lot
(all `REASON_UNKNOWN`) state changes are a subsequent consequences of a prior
cause: local, user, remote, protocol or onchain.

Changelog-Added: Plugins: Channel closure resaon/cause to channel_state_changed notification
2020-11-06 14:47:04 -06:00
..
test feat: adds state change cause and message 2020-11-06 14:47:04 -06:00
.gitignore dualopend: new dualopend daemon, containing most of accepter side 2020-09-09 19:54:20 +09:30
bitcoind.c lightningd: forward notifications from plugins if enabled. 2020-10-23 13:53:16 +10:30
bitcoind.h plugins/bcli.c: sendrawtransaction now has a required allowhighfees argument. 2020-09-09 12:38:19 +09:30
chaintopology.c topo: Do not keep txids in memory indefinitely 2020-09-23 13:52:49 +09:30
chaintopology.h plugins/bcli.c: sendrawtransaction now has a required allowhighfees argument. 2020-09-09 12:38:19 +09:30
channel_control.c feat: adds state change cause and message 2020-11-06 14:47:04 -06:00
channel_control.h peer_channeld: pass over PSBT, remove second message 2020-10-20 12:50:31 +10:30
channel_state.h feat: adds state change cause and message 2020-11-06 14:47:04 -06:00
channel.c feat: adds state change cause and message 2020-11-06 14:47:04 -06:00
channel.h feat: adds state change cause and message 2020-11-06 14:47:04 -06:00
closing_control.c feat: adds state change cause and message 2020-11-06 14:47:04 -06:00
closing_control.h
coin_mvts.c channel_id: save to database, dont derive from funding_txid 2020-09-09 19:54:20 +09:30
coin_mvts.h coins: re-write API interface for htlc notices 2020-05-12 15:46:58 +09:30
connect_control.c connectd: implement connection timeout (60 seconds). 2020-09-11 21:27:45 +09:30
connect_control.h
dual_open_control.c dual_open: correct silent enum conversions 2020-11-04 14:29:22 -06:00
dual_open_control.h dual-fund: accepter side implementation on lightningd 2020-09-09 19:54:20 +09:30
gossip_control.c Makefile: use completely separate spec-derived files for EXPERIMENTAL_FEATURES 2020-09-08 09:42:00 +09:30
gossip_control.h
gossip_msg.c wire: make fromwire_fail return non-const, use it more 2020-05-20 11:36:13 +02:00
gossip_msg.h gossipd: return channel_announcement features for listchannels. 2020-05-07 08:44:58 +09:30
hsm_control.c hsmd: convert to new wire generation style. 2020-08-25 12:53:13 +09:30
hsm_control.h hsm: decouple hsm from wallet; init before wallet 2020-06-11 13:13:13 +02:00
htlc_end.c coins: have we_fulfilled be fully 'ternary' 2020-05-12 15:46:58 +09:30
htlc_end.h Makefile: use completely separate spec-derived files for EXPERIMENTAL_FEATURES 2020-09-08 09:42:00 +09:30
htlc_set.c lightningd: note whether payment secret is used or not. 2020-10-28 12:03:14 +01:00
htlc_set.h Makefile: use completely separate spec-derived files for EXPERIMENTAL_FEATURES 2020-09-08 09:42:00 +09:30
invoice.c bolt11: have caller supply preferred chain. 2020-09-24 09:24:14 +09:30
invoice.h Makefile: use completely separate spec-derived files for EXPERIMENTAL_FEATURES 2020-09-08 09:42:00 +09:30
io_loop_with_timers.c
io_loop_with_timers.h
json.c json_command: command_fail_badparam helper. 2020-09-02 09:46:37 +09:30
json.h common: hoist param_bitcoin_address where plugins can use it. 2020-08-11 08:39:24 +09:30
jsonrpc.c lightningd: fix similar race in stop. 2020-11-06 14:05:44 -06:00
jsonrpc.h lightningd: infrastructure for internal notifications. 2020-10-23 13:53:16 +10:30
lightningd.c lightningd: fix similar race in stop. 2020-11-06 14:05:44 -06:00
lightningd.h df-open: add a 'open_commands' list to stash pending opens around in 2020-10-20 12:50:31 +10:30
log_status.c common: convert to new wire generation style. 2020-08-25 12:53:13 +09:30
log_status.h
log.c common: add routines for log level names. 2020-10-23 13:53:16 +10:30
log.h
Makefile Makefile: add $(LIGHTNINGD_SRC_NOHDR) to $(ALL_C_SOURCES) for "make clean" to work properly 2020-10-27 10:42:48 +10:30
memdump.c common/memleak: simplify and document API. 2020-09-23 13:52:49 +09:30
memdump.h
notification.c feat: adds state change cause and message 2020-11-06 14:47:04 -06:00
notification.h feat: adds state change cause and message 2020-11-06 14:47:04 -06:00
onchain_control.c feat: adds state change cause and message 2020-11-06 14:47:04 -06:00
onchain_control.h closingd: convert to new wire generation style. 2020-08-25 12:53:13 +09:30
onion_message.c json_command: command_fail_badparam helper. 2020-09-02 09:46:37 +09:30
onion_message.h
opening_common.c df-open: use channel_id for openchannel_update and openchannel_signed 2020-10-20 12:50:31 +10:30
opening_common.h df-open: use channel_id for openchannel_update and openchannel_signed 2020-10-20 12:50:31 +10:30
opening_control.c channel: save funding_psbt to database 2020-10-20 12:50:31 +10:30
opening_control.h memleak: 'generify' the memleak calling to code for openingd/dualopend 2020-09-17 10:12:08 +09:30
options.c dev-force-features: adds a second valid format for forcing features 2020-10-26 21:31:24 -05:00
options.h
pay.c bolt11: have caller supply preferred chain. 2020-09-24 09:24:14 +09:30
pay.h lightningd: don't report spurious temporary_node_failure on local failures. 2020-05-04 18:56:33 +09:30
peer_control.c feat: adds state change cause and message 2020-11-06 14:47:04 -06:00
peer_control.h peer_control: move open_command up to where channeld can get it, 2020-10-20 12:50:31 +10:30
peer_htlcs.c feat: adds state change cause and message 2020-11-06 14:47:04 -06:00
peer_htlcs.h lightningd: separate fee_states out of struct channel_info. 2020-09-23 15:51:13 +09:30
ping.c gossipd: convert wire to new scheme. 2020-08-25 12:53:13 +09:30
ping.h
plugin_control.c lightningd: remove deprecated result for plugin stop. 2020-09-18 12:08:07 +09:30
plugin_control.h lightningd: attach plugins natively to the command which started it. 2020-05-05 13:45:17 +09:30
plugin_hook.c lightningd: forward notifications from plugins if enabled. 2020-10-23 13:53:16 +10:30
plugin_hook.h plugin_hook_call: return indication whether we called the callback or not. 2020-05-05 13:45:17 +09:30
plugin.c lightningd: forward notifications from plugins if enabled. 2020-10-23 13:53:16 +10:30
plugin.h lightningd: always do incremental parsing of JSON inputs. 2020-08-21 09:52:33 +09:30
routehint.c lightningd: extract routehint selection code. 2020-09-08 19:47:11 +09:30
routehint.h lightningd: extract routehint selection code. 2020-09-08 19:47:11 +09:30
signmessage.c gossipd: convert wire to new scheme. 2020-08-25 12:53:13 +09:30
subd.c Makefile: use generic rules to make spec-derived sources. 2020-08-31 21:33:26 -05:00
subd.h
watch.c
watch.h