Note: this can actually happen if a single-use offer is already * used at the same time between the check and now. */
| 164 | * used at the same time between the check and now. |
| 165 | */ |
| 166 | static struct command_result *error(struct command *cmd, |
| 167 | const char *method, |
| 168 | const char *buf, |
| 169 | const jsmntok_t *err, |
| 170 | struct invreq *ir) |
| 171 | { |
| 172 | return fail_internalerr(cmd, ir, |
| 173 | "Got JSON error: %.*s", |
| 174 | json_tok_full_len(err), |
| 175 | json_tok_full(buf, err)); |
| 176 | } |
| 177 | |
| 178 | /* We can fail to create the invoice if we've already done so. */ |
| 179 | static struct command_result *createinvoice_done(struct command *cmd, |
no test coverage detected