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

Function get_next_pay_index

wallet/invoices.c:500–509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

498}
499
500static s64 get_next_pay_index(struct db *db)
501{
502 /* Equivalent to (next_pay_index++) */
503 s64 next_pay_index;
504 next_pay_index = db_get_intvar(db, "next_pay_index", 0);
505 /* Variable should exist. */
506 assert(next_pay_index > 0);
507 db_set_intvar(db, "next_pay_index", next_pay_index + 1);
508 return next_pay_index;
509}
510
511static enum invoice_status invoice_get_status(struct invoices *invoices, struct invoice invoice)
512{

Callers 1

invoices_resolveFunction · 0.85

Calls 2

db_set_intvarFunction · 0.85
db_get_intvarFunction · 0.50

Tested by

no test coverage detected