| 479 | } |
| 480 | |
| 481 | struct command_result *command_fail(struct command *cmd, enum jsonrpc_errcode code, |
| 482 | const char *fmt, ...) |
| 483 | { |
| 484 | const char *errmsg; |
| 485 | struct json_stream *r; |
| 486 | va_list ap; |
| 487 | |
| 488 | va_start(ap, fmt); |
| 489 | errmsg = tal_vfmt(cmd, fmt, ap); |
| 490 | va_end(ap); |
| 491 | r = json_stream_fail_nodata(cmd, code, errmsg); |
| 492 | |
| 493 | return command_failed(cmd, r); |
| 494 | } |
| 495 | |
| 496 | struct command_result *command_still_pending(struct command *cmd) |
| 497 | { |
no test coverage detected