Where the splice tx gets finally transmitted to the chain */
| 612 | |
| 613 | /* Where the splice tx gets finally transmitted to the chain */ |
| 614 | static void send_splice_tx(struct channel *channel, |
| 615 | const struct bitcoin_tx *tx, |
| 616 | struct splice_command *cc, |
| 617 | u32 output_index, |
| 618 | struct wally_psbt *psbt) |
| 619 | { |
| 620 | struct lightningd *ld = channel->peer->ld; |
| 621 | u8* tx_bytes = linearize_tx(tmpctx, tx); |
| 622 | |
| 623 | log_debug(channel->log, |
| 624 | "Broadcasting splice tx %s for channel %s. Final weight %zu", |
| 625 | tal_hex(tmpctx, tx_bytes), |
| 626 | fmt_channel_id(tmpctx, &channel->cid), |
| 627 | bitcoin_tx_weight(tx)); |
| 628 | |
| 629 | struct send_splice_info *info = tal(NULL, struct send_splice_info); |
| 630 | |
| 631 | info->channel = channel; |
| 632 | info->final_tx = tal_steal(info, tx); |
| 633 | info->output_index = output_index; |
| 634 | info->err_msg = NULL; |
| 635 | info->psbt = psbt; |
| 636 | |
| 637 | bitcoind_sendrawtx(ld->topology->bitcoind, |
| 638 | ld->topology->bitcoind, |
| 639 | cc ? cc->cmd->id : NULL, |
| 640 | tal_hex(tmpctx, tx_bytes), |
| 641 | false, |
| 642 | send_splice_tx_done, info); |
| 643 | } |
| 644 | |
| 645 | /* After channeld have all the signatures it sends the result to us here */ |
| 646 | static void handle_splice_confirmed_signed(struct lightningd *ld, |
no test coverage detected