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

Function resend_opening_transactions

lightningd/peer_control.c:557–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555}
556
557void resend_opening_transactions(struct lightningd *ld)
558{
559 struct peer *peer;
560 struct channel *channel;
561 struct peer_node_id_map_iter it;
562
563 for (peer = peer_node_id_map_first(ld->peers, &it);
564 peer;
565 peer = peer_node_id_map_next(ld->peers, &it)) {
566 list_for_each(&peer->channels, channel, list) {
567 struct wally_tx *wtx;
568 if (channel_state_uncommitted(channel->state))
569 continue;
570 if (!channel->funding_psbt || channel->withheld)
571 continue;
572 if (channel->depth != 0)
573 continue;
574 wtx = psbt_final_tx(tmpctx, channel->funding_psbt);
575 if (!wtx)
576 continue;
577 bitcoind_sendrawtx(channel,
578 ld->topology->bitcoind,
579 NULL,
580 tal_hex(tmpctx,
581 linearize_wtx(tmpctx, wtx)),
582 false, resend_funding_done, channel);
583 }
584 }
585}
586
587void channel_errmsg(struct channel *channel,
588 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