| 586 | } |
| 587 | |
| 588 | void resend_opening_transactions(struct lightningd *ld) |
| 589 | { |
| 590 | struct peer *peer; |
| 591 | struct channel *channel; |
| 592 | struct peer_node_id_map_iter it; |
| 593 | |
| 594 | for (peer = peer_node_id_map_first(ld->peers, &it); |
| 595 | peer; |
| 596 | peer = peer_node_id_map_next(ld->peers, &it)) { |
| 597 | list_for_each(&peer->channels, channel, list) { |
| 598 | struct wally_tx *wtx; |
| 599 | if (channel_state_uncommitted(channel->state)) |
| 600 | continue; |
| 601 | if (!channel->funding_psbt || channel->withheld) |
| 602 | continue; |
| 603 | if (channel->depth != 0) |
| 604 | continue; |
| 605 | wtx = psbt_final_tx(tmpctx, channel->funding_psbt); |
| 606 | if (!wtx) |
| 607 | continue; |
| 608 | bitcoind_sendrawtx(channel, |
| 609 | ld->topology->bitcoind, |
| 610 | NULL, |
| 611 | tal_hex(tmpctx, |
| 612 | linearize_wtx(tmpctx, wtx)), |
| 613 | false, resend_funding_done, channel); |
| 614 | } |
| 615 | } |
| 616 | } |
| 617 | |
| 618 | void channel_errmsg(struct channel *channel, |
| 619 | struct peer_fd *peer_fd, |
no test coverage detected