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

Function process_getrawblock

plugins/bcli.c:559–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

557};
558
559static struct command_result *process_getrawblock(struct bitcoin_cli *bcli)
560{
561 struct json_stream *response;
562 struct getrawblock_stash *stash = bcli->stash;
563
564 strip_trailing_whitespace(bcli->output, bcli->output_bytes);
565 stash->block_hex = tal_steal(stash, bcli->output);
566
567 response = jsonrpc_stream_success(bcli->cmd);
568 json_add_string(response, "blockhash", stash->block_hash);
569 json_add_string(response, "block", stash->block_hex);
570
571 return command_finished(bcli->cmd, response);
572}
573
574static struct command_result *
575getrawblockbyheight_notfound(struct bitcoin_cli *bcli)

Callers

nothing calls this directly

Calls 4

jsonrpc_stream_successFunction · 0.70
command_finishedFunction · 0.70
json_add_stringFunction · 0.50

Tested by

no test coverage detected