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

Function bitcoind_sendrawtx_

lightningd/bitcoind.c:389–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387}
388
389void bitcoind_sendrawtx_(const tal_t *ctx,
390 struct bitcoind *bitcoind,
391 const char *id_prefix,
392 const char *hextx,
393 bool allowhighfees,
394 void (*cb)(struct bitcoind *bitcoind,
395 bool success, const char *msg, void *),
396 void *cb_arg)
397{
398 struct jsonrpc_request *req;
399 struct sendrawtx_call *call = tal(ctx, struct sendrawtx_call);
400
401 call->bitcoind = bitcoind;
402 call->cb = cb;
403 call->cb_arg = cb_arg;
404 log_debug(bitcoind->log, "sendrawtransaction: %s", hextx);
405
406 req = jsonrpc_request_start(call, "sendrawtransaction",
407 id_prefix,
408 bitcoind->log,
409 NULL, sendrawtx_callback,
410 call);
411 json_add_string(req->stream, "tx", hextx);
412 json_add_bool(req->stream, "allowhighfees", allowhighfees);
413 jsonrpc_request_end(req);
414 bitcoin_plugin_send(bitcoind, req);
415}
416
417/* `getrawblockbyheight`
418 *

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