mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 18:57:06 +01:00
libplugin: add a 'still_pending' helper
This commit is contained in:
parent
5c7f9b542a
commit
b0b55d36ef
2 changed files with 10 additions and 0 deletions
|
@ -217,6 +217,12 @@ command_finished(struct command *cmd, struct json_stream *response)
|
||||||
return command_complete(cmd, response);
|
return command_complete(cmd, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct command_result *WARN_UNUSED_RESULT
|
||||||
|
command_still_pending(struct command *cmd)
|
||||||
|
{
|
||||||
|
return &pending;
|
||||||
|
}
|
||||||
|
|
||||||
struct json_out *json_out_obj(const tal_t *ctx,
|
struct json_out *json_out_obj(const tal_t *ctx,
|
||||||
const char *fieldname,
|
const char *fieldname,
|
||||||
const char *str)
|
const char *str)
|
||||||
|
|
|
@ -138,6 +138,10 @@ struct json_stream *jsonrpc_stream_fail_data(struct command *cmd,
|
||||||
struct command_result *WARN_UNUSED_RESULT
|
struct command_result *WARN_UNUSED_RESULT
|
||||||
command_finished(struct command *cmd, struct json_stream *response);
|
command_finished(struct command *cmd, struct json_stream *response);
|
||||||
|
|
||||||
|
/* Helper for a command that'll be finished in a callback. */
|
||||||
|
struct command_result *WARN_UNUSED_RESULT
|
||||||
|
command_still_pending(struct command *cmd);
|
||||||
|
|
||||||
/* Helper to create a zero or single-value JSON object; if @str is NULL,
|
/* Helper to create a zero or single-value JSON object; if @str is NULL,
|
||||||
* object is empty. */
|
* object is empty. */
|
||||||
struct json_out *json_out_obj(const tal_t *ctx,
|
struct json_out *json_out_obj(const tal_t *ctx,
|
||||||
|
|
Loading…
Add table
Reference in a new issue