| 369 | } |
| 370 | |
| 371 | void 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 | * |
nothing calls this directly
no test coverage detected