Now, we need to check the previous invoice was paid, and maybe get timebase */
| 596 | |
| 597 | /* Now, we need to check the previous invoice was paid, and maybe get timebase */ |
| 598 | static struct command_result *check_previous_invoice(struct command *cmd, |
| 599 | struct invreq *ir) |
| 600 | { |
| 601 | struct out_req *req; |
| 602 | |
| 603 | /* No previous? Just pass through */ |
| 604 | if (*ir->invreq->invreq_recurrence_counter == 0) |
| 605 | return check_period(cmd, ir, *ir->inv->invoice_created_at); |
| 606 | |
| 607 | req = jsonrpc_request_start(cmd, |
| 608 | "listinvoices", |
| 609 | prev_invoice_done, |
| 610 | error, |
| 611 | ir); |
| 612 | json_add_label(req->js, |
| 613 | &ir->offer_id, |
| 614 | ir->invreq->invreq_payer_id, |
| 615 | *ir->invreq->invreq_recurrence_counter - 1); |
| 616 | return send_outreq(req); |
| 617 | } |
| 618 | |
| 619 | /* BOLT #12: |
| 620 |
no test coverage detected