MCPcopy Create free account
hub / github.com/ElementsProject/lightning / find_chain_events

Function find_chain_events

plugins/bkpr/recorder.c:69–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69static struct chain_event **find_chain_events(const tal_t *ctx,
70 struct db_stmt *stmt TAKES)
71{
72 struct chain_event **results;
73
74 db_query_prepared(stmt);
75 if (stmt->error)
76 db_fatal("find_chain_events err: %s", stmt->error);
77 results = tal_arr(ctx, struct chain_event *, 0);
78 while (db_step(stmt)) {
79 struct chain_event *e = stmt2chain_event(results, stmt);
80 tal_arr_expand(&results, e);
81 }
82
83 if (taken(stmt))
84 tal_free(stmt);
85
86 return results;
87}
88
89static struct channel_event *stmt2channel_event(const tal_t *ctx, struct db_stmt *stmt)
90{

Callers 4

account_get_chain_eventsFunction · 0.85
find_txos_for_txFunction · 0.85
find_chain_events_bytxidFunction · 0.85

Calls 6

db_query_preparedFunction · 0.85
db_stepFunction · 0.85
stmt2chain_eventFunction · 0.85
takenFunction · 0.85
tal_freeFunction · 0.85
db_fatalFunction · 0.70

Tested by

no test coverage detected