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

Function update_db_expirations

wallet/invoices.c:129–140  ·  view source on GitHub ↗

Update expirations. */

Source from the content-addressed store, hash-verified

127
128/* Update expirations. */
129static void update_db_expirations(struct invoices *invoices, u64 now)
130{
131 struct db_stmt *stmt;
132 stmt = db_prepare_v2(invoices->db, SQL("UPDATE invoices"
133 " SET state = ?"
134 " WHERE state = ?"
135 " AND expiry_time <= ?;"));
136 db_bind_int(stmt, 0, EXPIRED);
137 db_bind_int(stmt, 1, UNPAID);
138 db_bind_u64(stmt, 2, now);
139 db_exec_prepared_v2(take(stmt));
140}
141
142static void install_expiration_timer(struct invoices *invoices);
143

Callers 2

invoices_newFunction · 0.85
trigger_expirationFunction · 0.85

Calls 3

db_bind_intFunction · 0.85
db_bind_u64Function · 0.85
db_exec_prepared_v2Function · 0.85

Tested by

no test coverage detected