| 4503 | } |
| 4504 | |
| 4505 | struct db_stmt *payments_first(struct wallet *wallet, |
| 4506 | const enum wait_index *listindex, |
| 4507 | u64 liststart, |
| 4508 | const u32 *listlimit) |
| 4509 | { |
| 4510 | struct db_stmt *stmt; |
| 4511 | |
| 4512 | if (listindex && *listindex == WAIT_INDEX_UPDATED) { |
| 4513 | stmt = db_prepare_v2(wallet->db, SQL("SELECT" |
| 4514 | " id" |
| 4515 | ", updated_index" |
| 4516 | ", status" |
| 4517 | ", destination" |
| 4518 | ", msatoshi" |
| 4519 | ", payment_hash" |
| 4520 | ", timestamp" |
| 4521 | ", payment_preimage" |
| 4522 | ", path_secrets" |
| 4523 | ", route_nodes" |
| 4524 | ", route_channels" |
| 4525 | ", msatoshi_sent" |
| 4526 | ", description" |
| 4527 | ", bolt11" |
| 4528 | ", paydescription" |
| 4529 | ", failonionreply" |
| 4530 | ", total_msat" |
| 4531 | ", partid" |
| 4532 | ", local_invreq_id" |
| 4533 | ", groupid" |
| 4534 | ", completed_at" |
| 4535 | " FROM payments" |
| 4536 | " WHERE updated_index >= ?" |
| 4537 | " ORDER BY updated_index" |
| 4538 | " LIMIT ?;")); |
| 4539 | } else { |
| 4540 | stmt = db_prepare_v2(wallet->db, SQL("SELECT" |
| 4541 | " id" |
| 4542 | ", updated_index" |
| 4543 | ", status" |
| 4544 | ", destination" |
| 4545 | ", msatoshi" |
| 4546 | ", payment_hash" |
| 4547 | ", timestamp" |
| 4548 | ", payment_preimage" |
| 4549 | ", path_secrets" |
| 4550 | ", route_nodes" |
| 4551 | ", route_channels" |
| 4552 | ", msatoshi_sent" |
| 4553 | ", description" |
| 4554 | ", bolt11" |
| 4555 | ", paydescription" |
| 4556 | ", failonionreply" |
| 4557 | ", total_msat" |
| 4558 | ", partid" |
| 4559 | ", local_invreq_id" |
| 4560 | ", groupid" |
| 4561 | ", completed_at" |
| 4562 | " FROM payments" |
no test coverage detected