| 386 | } |
| 387 | |
| 388 | void bitcoind_getrawblockbyheight_(struct bitcoind *bitcoind, |
| 389 | u32 height, |
| 390 | void (*cb)(struct bitcoind *bitcoind, |
| 391 | struct bitcoin_blkid *blkid, |
| 392 | struct bitcoin_block *blk, |
| 393 | void *arg), |
| 394 | void *cb_arg) |
| 395 | { |
| 396 | struct jsonrpc_request *req; |
| 397 | struct getrawblockbyheight_call *call = tal(NULL, |
| 398 | struct getrawblockbyheight_call); |
| 399 | |
| 400 | call->bitcoind = bitcoind; |
| 401 | call->cb = cb; |
| 402 | call->cb_arg = cb_arg; |
| 403 | |
| 404 | req = jsonrpc_request_start(bitcoind, "getrawblockbyheight", NULL, |
| 405 | bitcoind->log, |
| 406 | NULL, getrawblockbyheight_callback, |
| 407 | call); |
| 408 | json_add_num(req->stream, "height", height); |
| 409 | jsonrpc_request_end(req); |
| 410 | bitcoin_plugin_send(bitcoind, req); |
| 411 | } |
| 412 | |
| 413 | /* `getchaininfo` |
| 414 | * |
nothing calls this directly
no test coverage detected