plugins: simplify shutdown loop, simply close the db

The only thing that needs ld->wallet after this is destroy_invoices_waiter (off jsonrpc)
Could not find any other destructors (destroy_*) that need wallet or db access after this.
Any db access would now segfault.
This commit is contained in:
Simon Vrouwe
2021-12-06 16:28:55 +02:00
committed by Rusty Russell
parent be196b4219
commit f936fa926f
6 changed files with 9 additions and 30 deletions

View File

@@ -338,7 +338,6 @@ void plugin_hook_db_sync(struct db *db)
size_t i;
size_t num_hooks;
db_check_plugins_not_shutdown(db);
const char **changes = db_changes(db);
num_hooks = tal_count(hook->hooks);
if (num_hooks == 0)