| 390 | } |
| 391 | |
| 392 | struct command_result *WARN_UNUSED_RESULT |
| 393 | command_success(struct command *cmd, const struct json_out *result) |
| 394 | { |
| 395 | struct json_stream *js = jsonrpc_stream_start(cmd); |
| 396 | |
| 397 | json_out_add_splice(js->jout, "result", result); |
| 398 | return command_complete(cmd, js); |
| 399 | } |
| 400 | |
| 401 | struct command_result *command_done_err(struct command *cmd, |
| 402 | enum jsonrpc_errcode code, |