rgb-cln/lightningd
Rusty Russell ade10e7fc4 peer_control: fix leak false positive.
We generally hang things off our JSON response (this pattern predates
tmpctx!) but sometimes it gets reported as a memleak.  I'd prefer not
to mark JSON responses as "notleak", since they can be allocated for
a while), so use tmpctx here.

```
E           ValueError:
E           Node errors:
E           Global errors:
E            - Node /tmp/ltests-spnausnb/test_htlc_out_timeout_1/lightning-1/ has memory leaks: [
E               {
E                   "backtrace": [
E                       "ccan/ccan/tal/tal.c:442 (tal_alloc_)",
E                       "ccan/ccan/tal/tal.c:471 (tal_alloc_arr_)",
E                       "wallet/wallet.c:1775 (wallet_state_change_get)",
E                       "lightningd/peer_control.c:922 (json_add_channel)",
E                       "lightningd/peer_control.c:1424 (json_add_peer)",
E                       "lightningd/peer_control.c:1454 (json_listpeers)",
E                       "lightningd/jsonrpc.c:643 (command_exec)",
E                       "lightningd/jsonrpc.c:767 (rpc_command_hook_final)",
E                       "lightningd/plugin_hook.c:275 (plugin_hook_call_)",
E                       "lightningd/jsonrpc.c:855 (plugin_hook_call_rpc_command)",
E                       "lightningd/jsonrpc.c:942 (parse_request)",
E                       "lightningd/jsonrpc.c:1033 (read_json)",
E                       "ccan/ccan/io/io.c:59 (next_plan)",
E                       "ccan/ccan/io/io.c:435 (io_do_always)",
E                       "ccan/ccan/io/poll.c:300 (handle_always)",
E                       "ccan/ccan/io/poll.c:377 (io_loop)",
E                       "lightningd/io_loop_with_timers.c:24 (io_loop_with_timers)",
E                       "lightningd/lightningd.c:1097 (main)"
E                   ],
E                   "label": "wallet/wallet.c:1775:struct state_change_entry[]",
E                   "parents": [
E                       "common/json_stream.c:29:struct json_stream",
E                       "ccan/ccan/io/io.c:91:struct io_conn",
E                       "lightningd/lightningd.c:116:struct lightningd"
E                   ],
E                   "value": "0x55c6b02150b8"
E               }
E           ]
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-04-12 23:03:47 +02:00
..
test lightningd: get connection direction from connectd. 2021-03-26 13:22:33 +10:30
.gitignore dualopend: new `dualopend` daemon, containing most of accepter side 2020-09-09 19:54:20 +09:30
Makefile dual-funding: convert to runtime flag, --experimental-dual-fund 2021-03-25 20:05:11 +10:30
bitcoind.c typo: information is an uncountable mass noun 2021-03-16 10:45:40 +10:30
bitcoind.h plugins/bcli.c: `sendrawtransaction` now has a required `allowhighfees` argument. 2020-09-09 12:38:19 +09:30
chaintopology.c chaintopology: remove deprecated urgent/normal/slow feerate display. 2021-04-07 14:34:39 +09:30
chaintopology.h plugins/bcli.c: `sendrawtransaction` now has a required `allowhighfees` argument. 2020-09-09 12:38:19 +09:30
channel.c lightningd: set "direction" correctly for connect which is already connected. 2021-03-26 13:22:33 +10:30
channel.h df-broadcasts: use an impermanent marker to make sure we've sent things 2021-03-17 10:25:18 +10:30
channel_control.c Makefile: update to latest BOLT versions. 2021-04-07 14:34:39 +09:30
channel_control.h channel_fallen_behind: break out functionality into two methods 2021-01-10 13:44:04 +01:00
channel_state.h channel-state: add two new states, for dualopend 2021-01-10 13:44:04 +01:00
closing_control.c closingd: add support for handling wrong_funding. 2021-03-16 13:08:40 +10:30
closing_control.h common/per_per_state: generalize lightningd/peer_comm Part 1 2019-06-04 01:29:39 +00:00
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 lightningd: set "direction" correctly for connect which is already connected. 2021-03-26 13:22:33 +10:30
connect_control.h lightningd: get connection direction from connectd. 2021-03-26 13:22:33 +10:30
dual_open_control.c Makefile: update to latest BOLT versions. 2021-04-07 14:34:39 +09:30
dual_open_control.h connectd: clean up the channel stuffs when we get a reconnect 2021-03-06 15:03:56 +10:30
gossip_control.c lightningd: no longer forward failures to gossipd, let caller do it. 2021-02-02 13:44:01 +01: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 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: 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 coins: have `we_fulfilled` be fully 'ternary' 2020-05-12 15:46:58 +09:30
htlc_end.h common/sphinx: make TOTAL_PACKET_SIZE a macro. 2020-12-11 15:51:24 +01:00
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 plugin: Call invoice_payment hook before the matching notification 2021-03-19 10:18:42 +10: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 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 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 plugins: make rpc_command hook chainable 2021-03-03 09:18:53 +10:30
jsonrpc.h lightningd: infrastructure for internal notifications. 2020-10-23 13:53:16 +10:30
lightningd.c lightningd: remove unused `original_directory` field. 2021-04-07 14:34:39 +09:30
lightningd.h lightningd: remove unused `original_directory` field. 2021-04-07 14:34:39 +09:30
log.c lightningd/log.c: Fix up handling of SIGHUP. 2020-12-02 16:48:48 +10:30
log.h lightningd: use a simple array for less memory usage. 2019-11-18 04:50:22 +00:00
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
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 lightningd: get connection direction from connectd. 2021-03-26 13:22:33 +10:30
notification.h lightningd: get connection direction from connectd. 2021-03-26 13:22:33 +10:30
offer.c offers: make 'used' flag more useful. 2021-02-25 14:44:03 +10:30
onchain_control.c subd: remove ctype (channel_type) 2021-03-03 16:19:04 -06:00
onchain_control.h closingd: convert to new wire generation style. 2020-08-25 12:53:13 +09:30
onion_message.c lightningd: control onion messages by `experimental-onion-messages` option. 2021-01-13 14:45:36 +01: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 memleak,df: patchup memleak code for v2 channels 2021-03-03 16:19:04 -06:00
opening_common.h lightningd/opening_control: store funding scriptpubkey. 2021-03-16 13:10:07 +10:30
opening_control.c doc: remove suffix for included-in-master BOLTs. 2021-04-07 14:34:39 +09:30
opening_control.h memleak: 'generify' the memleak calling to code for openingd/dualopend 2020-09-17 10:12:08 +09:30
options.c Makefile: update to latest BOLT versions. 2021-04-07 14:34:39 +09:30
options.h common: parse --allow-deprecated-apis extremely early. 2019-11-23 22:42:34 +00:00
pay.c lightningd: no longer forward failures to gossipd, let caller do it. 2021-02-02 13:44:01 +01:00
pay.h lightningd: don't report spurious temporary_node_failure on local failures. 2020-05-04 18:56:33 +09:30
peer_control.c peer_control: fix leak false positive. 2021-04-12 23:03:47 +02:00
peer_control.h lightningd: set "direction" correctly for connect which is already connected. 2021-03-26 13:22:33 +10:30
peer_htlcs.c Added in_channel,out_channel,state params to listforwards 2021-03-03 09:19:20 +10:30
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 ping: complete JSON RPC ping commands even if one ping gets no response. 2018-09-14 22:11:23 +02:00
plugin.c plugin: always send allow-deprecated-apis in getmanifest. 2021-04-07 14:34:39 +09:30
plugin.h plugin: add log-level to plugin_kill, make it take format string. 2021-03-01 12:16:42 +01:00
plugin_control.c plugin: add log-level to plugin_kill, make it take format string. 2021-03-01 12:16:42 +01:00
plugin_control.h lightningd: attach plugins natively to the command which started it. 2020-05-05 13:45:17 +09:30
plugin_hook.c plugins: remove now-unused single-hook infrastructure. 2021-04-07 14:34:39 +09:30
plugin_hook.h plugins: remove now-unused single-hook infrastructure. 2021-04-07 14:34:39 +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 subd: remove "swap" methods 2021-03-03 16:19:04 -06:00
subd.h subd: remove "swap" methods 2021-03-03 16:19:04 -06:00
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