| 549 | } |
| 550 | |
| 551 | void bitcoind_getchaininfo_(const tal_t *ctx, |
| 552 | struct bitcoind *bitcoind, |
| 553 | const u32 height, |
| 554 | void (*cb)(struct bitcoind *bitcoind, |
| 555 | const char *chain, |
| 556 | u32 headercount, |
| 557 | u32 blockcount, |
| 558 | const bool ibd, |
| 559 | void *), |
| 560 | void *cb_arg) |
| 561 | { |
| 562 | struct jsonrpc_request *req; |
| 563 | struct getchaininfo_call *call = tal(ctx, struct getchaininfo_call); |
| 564 | |
| 565 | call->bitcoind = bitcoind; |
| 566 | call->cb = cb; |
| 567 | call->cb_arg = cb_arg; |
| 568 | |
| 569 | req = jsonrpc_request_start(call, "getchaininfo", NULL, |
| 570 | bitcoind->log, |
| 571 | NULL, getchaininfo_callback, call); |
| 572 | json_add_u32(req->stream, "last_height", height); |
| 573 | jsonrpc_request_end(req); |
| 574 | bitcoin_plugin_send(bitcoind, req); |
| 575 | } |
| 576 | |
| 577 | /* `getutxout` |
| 578 | * |
nothing calls this directly
no test coverage detected