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

Function list_chain_events_timebox

plugins/bkpr/recorder.c:140–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140struct chain_event **list_chain_events_timebox(const tal_t *ctx,
141 struct db *db,
142 u64 start_time,
143 u64 end_time)
144{
145 struct db_stmt *stmt;
146
147 stmt = db_prepare_v2(db, SQL("SELECT"
148 " e.id"
149 ", e.account_id"
150 ", a.name"
151 ", e.origin"
152 ", e.tag"
153 ", e.credit"
154 ", e.debit"
155 ", e.output_value"
156 ", e.currency"
157 ", e.timestamp"
158 ", e.blockheight"
159 ", e.utxo_txid"
160 ", e.outnum"
161 ", e.spending_txid"
162 ", e.payment_id"
163 ", e.ignored"
164 ", e.stealable"
165 ", e.ev_desc"
166 " FROM chain_events e"
167 " LEFT OUTER JOIN accounts a"
168 " ON e.account_id = a.id"
169 " WHERE e.timestamp > ?"
170 " AND e.timestamp <= ?"
171 " ORDER BY e.timestamp, e.id;"));
172
173 db_bind_u64(stmt, 0, start_time);
174 db_bind_u64(stmt, 1, end_time);
175 return find_chain_events(ctx, take(stmt));
176}
177
178struct chain_event **list_chain_events(const tal_t *ctx, struct db *db)
179{

Callers 2

list_chain_eventsFunction · 0.85
list_income_eventsFunction · 0.85

Calls 2

db_bind_u64Function · 0.85
find_chain_eventsFunction · 0.85

Tested by

no test coverage detected