core-lightning/lightningd
Rusty Russell d38cfcf33b lightningd: don't assume zero-length tlv fields will be NULL.
1. We assumed an empty upfront_shutdown_script TLV would become NULL:

	RPC call failed: method: fundchannel, payload: {'id': '022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59', 'amount': 1000000, 'announce': True}, error: {'code': -1, 'message': 'They sent error channel e7c2d5d14462fe269631418fbfc3db327843382e6a2a5a9c2991d2d6ba31d9f5: Unacceptable upfront_shutdown_script ', 'data': {'id': '022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59', 'method': 'fundchannel_start'}}"

2. We were assuming an empty enctlv would become NULL, too.

We should not have done this (there's a semantic difference between
"empty" and not-present for TLVs), so prepare for the change.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-07-21 13:27:27 -04:00
..
test liquidity-ads: persist channel blockheight states to disk 2021-07-20 13:28:38 -04:00
.gitignore dualopend: new dualopend daemon, containing most of accepter side 2020-09-09 19:54:20 +09:30
bitcoind.c lightningd: don't complain about unable to estimate fees if not mainnet. 2021-07-09 07:26:09 +09:30
bitcoind.h plugins/bcli.c: sendrawtransaction now has a required allowhighfees argument. 2020-09-09 12:38:19 +09:30
chaintopology.c chaintopology: new command 'parsefeerate' 2021-07-20 13:28:38 -04:00
chaintopology.h lightningd: add force-feerates option. 2021-07-09 07:26:09 +09:30
channel_control.c channel lease: fail leased channel if peer offline + blockheight behind 2021-07-20 13:28:38 -04:00
channel_control.h channeld: add a message to read if we only want to reestablish. 2021-06-25 13:23:28 +09:30
channel_state.h channel-state: add two new states, for dualopend 2021-01-10 13:44:04 +01:00
channel.c liquidity-ads: persist channel blockheight states to disk 2021-07-20 13:28:38 -04:00
channel.h liquidity-ads: persist channel blockheight states to disk 2021-07-20 13:28:38 -04:00
closing_control.c sendcustommsg: promote to non-dev 2021-07-14 14:39:44 -05:00
closing_control.h lightningd: always pass closing connections through channeld. 2021-06-25 13:23:28 +09:30
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: new command to make us send message and close. 2021-06-03 16:16:34 +09:30
connect_control.h lightningd: get connection direction from connectd. 2021-03-26 13:22:33 +10:30
dual_open_control.c queryrates: make it dev-only 2021-07-20 13:28:38 -04:00
dual_open_control.h openingd/dualopend: remove send_msg functionality. 2021-06-03 16:16:34 +09:30
gossip_control.c channel leases: pass expected lease rates around in compat form 2021-07-20 13:28:38 -04: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 lease_rates: parse them out of node_announcements 2021-07-20 13:28:38 -04:00
gossip_msg.h lease_rates: parse them out of node_announcements 2021-07-20 13:28:38 -04:00
hsm_control.c hsmd: cleanup encrypted hsm_secret detection 2021-01-06 13:50:01 +01:00
hsm_control.h hsm: decouple hsm from wallet; init before wallet 2020-06-11 13:13:13 +02:00
htlc_end.c lightning: Add status field to htlc_in 2021-06-05 17:47:32 +09:30
htlc_end.h htlc: Keep the parsed TLV payload around with the htlc_in 2021-06-26 10:55:13 +09:30
htlc_set.c lightningd: insist on payment_secret if bit compulsory on invoices. 2021-07-14 14:38:00 -05:00
htlc_set.h Makefile: use completely separate spec-derived files for EXPERIMENTAL_FEATURES 2020-09-08 09:42:00 +09:30
invoice.c invoice: output payment_secret in JSON. 2021-07-14 14:38:00 -05:00
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 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 common/json_tok: hoist param_short_channel_id from inside lightningd/ 2021-05-22 17:53:04 +09:30
json.h common: hoist param_bitcoin_address where plugins can use it. 2020-08-11 08:39:24 +09:30
jsonrpc.c plugin: Add the plugin we're serializing for in the serializer 2021-06-05 17:47:32 +09:30
jsonrpc.h lightningd: infrastructure for internal notifications. 2020-10-23 13:53:16 +10:30
lightningd.c lightningd: make invoices insist on payment_secret. 2021-07-14 14:38:00 -05:00
lightningd.h lightningd: add force-feerates option. 2021-07-09 07:26:09 +09:30
log_status.c common: convert to new wire generation style. 2020-08-25 12:53:13 +09:30
log_status.h lightningd: have logging include an optional node_id for each entry. 2019-11-18 04:50:22 +00:00
log.c lightningd: implement --log-timestamps=false. 2021-05-05 17:19:19 -05:00
log.h lightningd: use a simple array for less memory usage. 2019-11-18 04:50:22 +00:00
Makefile liquidity-ads: persist channel blockheight states to disk 2021-07-20 13:28:38 -04:00
memdump.c common/memleak: simplify and document API. 2020-09-23 13:52:49 +09:30
memdump.h lightningd: add code to search strmaps for memleak detection. 2019-02-07 20:33:50 +00:00
notification.c plugin: Move list of notification topics to each plugin 2021-05-03 11:20:15 +09:30
notification.h plugin: Prevent plugins from registering native notification topics 2021-05-03 11:20:15 +09:30
offer.c offer / offerout: return existing if its still active. 2021-07-21 13:27:27 -04:00
onchain_control.c channel utxo: persist the 'csv' lock value to database 2021-07-20 13:28:38 -04:00
onchain_control.h closingd: convert to new wire generation style. 2020-08-25 12:53:13 +09:30
onion_message.c lightningd: don't assume zero-length tlv fields will be NULL. 2021-07-21 13:27:27 -04:00
onion_message.h gossipd, channeld: handle onion messages in gossipd so we don't need a channel. 2021-01-09 14:34:35 +10:30
opening_common.c openingd: tell lightningd if we get a reestablish. 2021-06-25 13:23:28 +09:30
opening_common.h openingd: tell lightningd if we get a reestablish. 2021-06-25 13:23:28 +09:30
opening_control.c liquidity-ads: persist channel blockheight states to disk 2021-07-20 13:28:38 -04:00
opening_control.h openingd/dualopend: remove send_msg functionality. 2021-06-03 16:16:34 +09:30
options.c opts: Add option to register extra TLV types to accept 2021-07-15 12:13:06 -04:00
options.h common: parse --allow-deprecated-apis extremely early. 2019-11-23 22:42:34 +00:00
pay.c gossipd: remove routing, listchannels and listnodes infrastructure. 2021-06-16 10:29:17 +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 close: param to force-close a leased channel 2021-07-20 13:28:38 -04:00
peer_control.h sendcustommsg: promote to non-dev 2021-07-14 14:39:44 -05:00
peer_htlcs.c channel: wire blockheight updates from channeld in to database 2021-07-20 13:28:38 -04: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 plugins: add command field to subcommand output. 2021-06-25 09:49:33 +09:30
plugin_control.h plugins: add command field to subcommand output. 2021-06-25 09:49:33 +09:30
plugin_hook.c plugin: Add debug log entries when calling and returning from hooks 2021-06-05 17:47:32 +09:30
plugin_hook.h plugin: Add the plugin we're serializing for in the serializer 2021-06-05 17:47:32 +09:30
plugin.c plugin: rescan restarts plugin on update 2021-07-15 13:26:05 -04:00
plugin.h plugin: rescan restarts plugin on update 2021-07-15 13:26:05 -04:00
routehint.c invoice: overhaul routehints to use topology.listincoming, cleanup. 2021-06-16 10:29:17 +09:30
routehint.h invoice: overhaul routehints to use topology.listincoming, cleanup. 2021-06-16 10:29:17 +09:30
signmessage.c signmessage: use listnodes instead of gossipd_getnodes_request. 2021-06-16 10:29:17 +09:30
subd.c lightningd: don't send other messages until we've received version. 2021-04-24 13:56:58 +09:30
subd.h lightningd: don't send other messages until we've received version. 2021-04-24 13:56:58 +09:30
watch.c wallet: remove edgecase around transaction checks 2020-01-02 16:56:42 +01:00
watch.h lightningd: fix occasional missing txid detection. 2019-06-28 03:31:43 +00:00