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

Function bitcoind_getutxout_

lightningd/bitcoind.c:544–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

542}
543
544void bitcoind_getutxout_(struct bitcoind *bitcoind,
545 const struct bitcoin_outpoint *outpoint,
546 void (*cb)(struct bitcoind *,
547 const struct bitcoin_tx_output *,
548 void *),
549 void *cb_arg)
550{
551 struct jsonrpc_request *req;
552 struct getutxout_call *call = tal(bitcoind, struct getutxout_call);
553
554 call->bitcoind = bitcoind;
555 call->cb = cb;
556 call->cb_arg = cb_arg;
557
558 req = jsonrpc_request_start(bitcoind, "getutxout", NULL, bitcoind->log,
559 NULL, getutxout_callback, call);
560 json_add_txid(req->stream, "txid", &outpoint->txid);
561 json_add_num(req->stream, "vout", outpoint->n);
562 jsonrpc_request_end(req);
563 bitcoin_plugin_send(bitcoind, req);
564}
565
566/* Context for the getfilteredblock call. Wraps the actual arguments while we
567 * process the various steps. */

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected