| 557 | }; |
| 558 | |
| 559 | static 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 | |
| 574 | static struct command_result * |
| 575 | getrawblockbyheight_notfound(struct bitcoin_cli *bcli) |
nothing calls this directly
no test coverage detected