Skip to content

Commit

Permalink
wallet: don't load indexes inside outpointfilters_init trace span.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rustyrussell committed Jul 30, 2023
1 parent 047615f commit 42c7008
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wallet/wallet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 42c7008

Please sign in to comment.