MCPcopy Create free account
hub / github.com/ElementsProject/lightning / process_sendrawtransaction

Function process_sendrawtransaction

plugins/bcli.c:526–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

524}
525
526static struct command_result *process_sendrawtransaction(struct bitcoin_cli *bcli)
527{
528 struct json_stream *response;
529
530 /* This is useful for functional tests. */
531 if (bcli->exitstatus)
532 plugin_log(bcli->cmd->plugin, LOG_DBG,
533 "sendrawtx exit %i (%s) %.*s",
534 *bcli->exitstatus, bcli_args(bcli),
535 *bcli->exitstatus ?
536 (u32)bcli->output_bytes-1 : 0,
537 bcli->output);
538
539 response = jsonrpc_stream_success(bcli->cmd);
540 json_add_bool(response, "success",
541 *bcli->exitstatus == 0 ||
542 *bcli->exitstatus ==
543 RPC_TRANSACTION_ALREADY_IN_CHAIN);
544 json_add_string(response, "errmsg",
545 *bcli->exitstatus ?
546 tal_strndup(bcli->cmd,
547 bcli->output, bcli->output_bytes-1)
548 : "");
549
550 return command_finished(bcli->cmd, response);
551}
552
553struct getrawblock_stash {
554 const char *block_hash;

Callers

nothing calls this directly

Calls 6

bcli_argsFunction · 0.85
plugin_logFunction · 0.70
jsonrpc_stream_successFunction · 0.70
command_finishedFunction · 0.70
json_add_boolFunction · 0.50
json_add_stringFunction · 0.50

Tested by

no test coverage detected