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

Function resend_opening_transactions

lightningd/peer_control.c:588–616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

586}
587
588void 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
618void channel_errmsg(struct channel *channel,
619 struct peer_fd *peer_fd,

Callers 1

mainFunction · 0.70

Calls 4

psbt_final_txFunction · 0.85
tal_hexFunction · 0.85
linearize_wtxFunction · 0.85

Tested by

no test coverage detected