Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoclean gains SUPER POWERS (and other optimizations) #5594

Merged
merged 30 commits into from
Sep 22, 2022
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fef2587
libplugin: handle JSON reply after command freed.
rustyrussell Sep 19, 2022
ca4cab8
autoclean: new interface
rustyrussell Sep 19, 2022
34f5ed6
lightningd: deprecated "delexpiredinvoice", put functionality in auto…
rustyrussell Sep 19, 2022
64ad3a6
autoclean: save stats on how much we cleaned.
rustyrussell Sep 19, 2022
7161591
autoclean: allow cleaning of paid invoices too.
rustyrussell Sep 19, 2022
879b050
autoclean: handle cleaning of old payments (not just invoices).
rustyrussell Sep 19, 2022
bc5389c
lightningd: index to speed up sendpay / listsendpays
rustyrussell Sep 19, 2022
3d8c7da
wallet: simplify payments lookup so sqlite3 uses index.
rustyrussell Sep 19, 2022
3c5d656
wallet: replace forwarded_payments table with forwards table.
rustyrussell Sep 19, 2022
93ae8a9
db/bindings: rename db_bind_short_channel_id to db_bind_short_channel…
rustyrussell Sep 19, 2022
f18ba20
wallet: use db_col_scid / db_bind_scid where possible.
rustyrussell Sep 19, 2022
5cdf084
db: add `scid` field to channels table.
rustyrussell Sep 19, 2022
75fbec6
wallet: use scid not string for failchannel (now failscid) in payment…
rustyrussell Sep 19, 2022
9ba5483
lightningd: add in_htlc_id / out_htlc_id to listforwards.
rustyrussell Sep 19, 2022
da272a0
lightningd: add `listhtlcs` to list all the HTLCs we know about.
rustyrussell Sep 19, 2022
21ddd0e
lightningd: add `delforward` command.
rustyrussell Sep 19, 2022
70ef7ca
autoclean: clean up listforwards as well.
rustyrussell Sep 19, 2022
cba2a7d
autoclean: use config variables, not commands.
rustyrussell Sep 19, 2022
dbaa78a
doc: manpages and schemas for autoclean-status.
rustyrussell Sep 19, 2022
3bc0f05
autoclean: add autoclean-once command.
rustyrussell Sep 19, 2022
367b1e9
autoclean: remove per-delete debugging messages.
rustyrussell Sep 19, 2022
5d571a2
libplugin: optimize parsing lightningd rpc responses.
rustyrussell Sep 19, 2022
1eaa4f9
libplugin: avoid memmove if we have many outputs to lightningd.
rustyrussell Sep 19, 2022
85f1e50
lightningd: don't always wrap each command in a db transaction.
rustyrussell Sep 19, 2022
bf354a0
lightningd: allow a connection to specify db batching.
rustyrussell Sep 19, 2022
6684857
lightningd: listsendpays always has groupid.
rustyrussell Sep 19, 2022
45cf6f5
lightningd: allow delpay to delete a specific payment.
rustyrussell Sep 19, 2022
017acac
db/postgres: avoid memleak.
rustyrussell Sep 19, 2022
606e6d3
db: set now-unused channels.short_channel_id text column to NULL afte…
rustyrussell Sep 19, 2022
2ac334d
pytest: slow down test_autoclean.
rustyrussell Sep 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
libplugin: handle JSON reply after command freed.
This can happen, and in fact does below in our test_autoclean_once
test where we update the datastore, and return from the cmd.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell authored and cdecker committed Sep 22, 2022
commit fef2587a2a8f79897fb070ba318cc175cc8f4f44
7 changes: 5 additions & 2 deletions plugins/libplugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,10 +681,13 @@ static void handle_rpc_reply(struct plugin *plugin, const jsmntok_t *toks)
out = strmap_getn(&plugin->out_reqs,
plugin->rpc_buffer + idtok->start,
idtok->end - idtok->start);
if (!out)
plugin_err(plugin, "JSON reply with unknown id '%.*s'",
if (!out) {
/* This can actually happen, if they free req! */
plugin_log(plugin, LOG_DBG, "JSON reply with unknown id '%.*s'",
json_tok_full_len(toks),
json_tok_full(plugin->rpc_buffer, toks));
return;
}

/* Remove destructor if one existed */
if (out->cmd)
Expand Down