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

Function bitcoind_sendrawtx_

lightningd/bitcoind.c:301–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301void bitcoind_sendrawtx_(struct bitcoind *bitcoind,
302 const char *id_prefix,
303 const char *hextx,
304 bool allowhighfees,
305 void (*cb)(struct bitcoind *bitcoind,
306 bool success, const char *msg, void *),
307 void *cb_arg)
308{
309 struct jsonrpc_request *req;
310 struct sendrawtx_call *call = tal(bitcoind, struct sendrawtx_call);
311
312 call->bitcoind = bitcoind;
313 call->cb = cb;
314 call->cb_arg = cb_arg;
315 log_debug(bitcoind->log, "sendrawtransaction: %s", hextx);
316
317 req = jsonrpc_request_start(bitcoind, "sendrawtransaction", id_prefix,
318 bitcoind->log,
319 NULL, sendrawtx_callback,
320 call);
321 json_add_string(req->stream, "tx", hextx);
322 json_add_bool(req->stream, "allowhighfees", allowhighfees);
323 jsonrpc_request_end(req);
324 bitcoin_plugin_send(bitcoind, req);
325}
326
327/* `getrawblockbyheight`
328 *

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected