Note: this can actually happen if a single-use offer is already * used at the same time between the check and now. */
| 153 | * used at the same time between the check and now. |
| 154 | */ |
| 155 | static struct command_result *error(struct command *cmd, |
| 156 | const char *buf, |
| 157 | const jsmntok_t *err, |
| 158 | struct invreq *ir) |
| 159 | { |
| 160 | return fail_internalerr(cmd, ir, |
| 161 | "Got JSON error: %.*s", |
| 162 | json_tok_full_len(err), |
| 163 | json_tok_full(buf, err)); |
| 164 | } |
| 165 | |
| 166 | /* We can fail to create the invoice if we've already done so. */ |
| 167 | static struct command_result *createinvoice_done(struct command *cmd, |
no test coverage detected