MCPcopy Create free account
hub / github.com/ElementsProject/lightning / bitcoind_getutxout_

Function bitcoind_getutxout_

lightningd/bitcoind.c:628–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

626}
627
628void bitcoind_getutxout_(const tal_t *ctx,
629 struct bitcoind *bitcoind,
630 const struct bitcoin_outpoint *outpoint,
631 void (*cb)(struct bitcoind *,
632 const struct bitcoin_tx_output *,
633 void *),
634 void *cb_arg)
635{
636 struct jsonrpc_request *req;
637 struct getutxout_call *call = tal(ctx, struct getutxout_call);
638
639 call->bitcoind = bitcoind;
640 call->cb = cb;
641 call->cb_arg = cb_arg;
642
643 req = jsonrpc_request_start(call, "getutxout", NULL,
644 bitcoind->log,
645 NULL, getutxout_callback, call);
646 json_add_txid(req->stream, "txid", &outpoint->txid);
647 json_add_num(req->stream, "vout", outpoint->n);
648 jsonrpc_request_end(req);
649 bitcoin_plugin_send(bitcoind, req);
650}
651
652/* Context for the getfilteredblock call. Wraps the actual arguments while we
653 * process the various steps. */

Callers

nothing calls this directly

Calls 4

json_add_txidFunction · 0.85
json_add_numFunction · 0.85
bitcoin_plugin_sendFunction · 0.85
jsonrpc_request_endFunction · 0.70

Tested by

no test coverage detected