Fetch a block by height for normal polling. */
| 57 | |
| 58 | /* Fetch a block by height for normal polling. */ |
| 59 | static struct command_result *fetch_block_handle(struct command *cmd, |
| 60 | u32 height) |
| 61 | { |
| 62 | struct out_req *req = jsonrpc_request_start(cmd, "getrawblockbyheight", |
| 63 | handle_block, handle_block, |
| 64 | int2ptr(height)); |
| 65 | json_add_u32(req->js, "height", height); |
| 66 | return send_outreq(req); |
| 67 | } |
| 68 | |
| 69 | /* Reschedule at the configured interval (used when there's nothing new to |
| 70 | * fetch, or on error). Once we're caught up to bitcoind's tip, this is |
no test coverage detected