Return from "listincoming". */
| 922 | |
| 923 | /* Return from "listincoming". */ |
| 924 | static void listincoming_done(const char *buffer, |
| 925 | const jsmntok_t *toks, |
| 926 | const jsmntok_t *idtok UNUSED, |
| 927 | struct invoice_info *info) |
| 928 | { |
| 929 | struct lightningd *ld = info->cmd->ld; |
| 930 | struct command_result *ret; |
| 931 | bool warning_mpp, warning_capacity, warning_deadends, warning_offline, warning_private_unused; |
| 932 | |
| 933 | ret = add_routehints(info, buffer, toks, |
| 934 | &warning_mpp, |
| 935 | &warning_capacity, |
| 936 | &warning_deadends, |
| 937 | &warning_offline, |
| 938 | &warning_private_unused); |
| 939 | if (ret) |
| 940 | return; |
| 941 | |
| 942 | /* We're actually outside a db transaction here: spooky! */ |
| 943 | db_begin_transaction(ld->wallet->db); |
| 944 | invoice_complete(info, |
| 945 | false, |
| 946 | warning_mpp, |
| 947 | warning_capacity, |
| 948 | warning_deadends, |
| 949 | warning_offline, |
| 950 | warning_private_unused); |
| 951 | db_commit_transaction(ld->wallet->db); |
| 952 | } |
| 953 | |
| 954 | #if DEVELOPER |
| 955 | /* Since this is a dev-only option, we will crash if dev-routes is not |
nothing calls this directly
no test coverage detected