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

Function bitcoind_sendrawtx_

lightningd/bitcoind.c:371–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369}
370
371void bitcoind_sendrawtx_(const tal_t *ctx,
372 struct bitcoind *bitcoind,
373 const char *id_prefix,
374 const char *hextx,
375 bool allowhighfees,
376 void (*cb)(struct bitcoind *bitcoind,
377 bool success, const char *msg, void *),
378 void *cb_arg)
379{
380 struct jsonrpc_request *req;
381 struct sendrawtx_call *call = tal(ctx, struct sendrawtx_call);
382
383 call->bitcoind = bitcoind;
384 call->cb = cb;
385 call->cb_arg = cb_arg;
386 log_debug(bitcoind->log, "sendrawtransaction: %s", hextx);
387
388 req = jsonrpc_request_start(call, "sendrawtransaction",
389 id_prefix,
390 bitcoind->log,
391 NULL, sendrawtx_callback,
392 call);
393 json_add_string(req->stream, "tx", hextx);
394 json_add_bool(req->stream, "allowhighfees", allowhighfees);
395 jsonrpc_request_end(req);
396 bitcoin_plugin_send(bitcoind, req);
397}
398
399/* `getrawblockbyheight`
400 *

Callers

nothing calls this directly

Calls 4

json_add_boolFunction · 0.85
bitcoin_plugin_sendFunction · 0.85
jsonrpc_request_endFunction · 0.70
json_add_stringFunction · 0.50

Tested by

no test coverage detected