Fetch a single block by height during a rescan. */
| 334 | |
| 335 | /* Fetch a single block by height during a rescan. */ |
| 336 | static struct command_result *fetch_block_rescan(struct command *cmd, |
| 337 | u32 height, |
| 338 | struct command_result *(*cb)(struct command *, |
| 339 | const char *, |
| 340 | const char *, |
| 341 | const jsmntok_t *, |
| 342 | struct rescan_state *), |
| 343 | struct rescan_state *rescan) |
| 344 | { |
| 345 | struct out_req *req = jsonrpc_request_start(cmd, "getrawblockbyheight", |
| 346 | cb, cb, rescan); |
| 347 | json_add_u32(req->js, "height", height); |
| 348 | return send_outreq(req); |
| 349 | } |
| 350 | |
| 351 | /* Finish a rescan chain: RPC commands get a JSON result; aux/timer |
| 352 | * commands just terminate. */ |
no test coverage detected