common/json_stream: make json_add_jsonstr take a length.

This is useful when have have a jsmntok_t.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-07-16 14:28:58 +09:30
parent f65d3bb1fc
commit d0a55a62b3
6 changed files with 23 additions and 15 deletions

View File

@@ -356,7 +356,7 @@ static struct command_result *start_mw(struct multiwithdraw_command *mw)
&mw_forward_error,
mw);
json_add_bool(req->js, "reservedok", false);
json_add_jsonstr(req->js, "utxos", mw->utxos);
json_add_jsonstr(req->js, "utxos", mw->utxos, strlen(mw->utxos));
} else {
plugin_log(mw->cmd->plugin, LOG_DBG,
"multiwithdraw %"PRIu64": fundpsbt.",