From bdd4f6b3c4465d30561e3e223d9cfffeac81eae3 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 31 Jul 2023 18:34:43 +0930 Subject: [PATCH] wallet: don't load indexes inside outpointfilters_init trace span. It's confusing: we can (and should) load this before other operations, though we don't actually need to yet. But more importantly, don't put it under the "outpointfilters_init" trace span. Signed-off-by: Rusty Russell --- wallet/wallet.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wallet/wallet.c b/wallet/wallet.c index 3ef28d9ec..e28f59cf8 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -117,13 +117,16 @@ struct wallet *wallet_new(struct lightningd *ld, struct timers *timers) db_begin_transaction(wallet->db); + trace_span_start("load_indexes", wallet); + load_indexes(wallet->db, ld->indexes); + trace_span_end(wallet); + trace_span_start("invoices_new", wallet); wallet->invoices = invoices_new(wallet, wallet, timers); trace_span_end(wallet); trace_span_start("outpointfilters_init", wallet); outpointfilters_init(wallet); - load_indexes(wallet->db, ld->indexes); trace_span_end(wallet); db_commit_transaction(wallet->db);