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

Function peer_any_active_channel

lightningd/channel.c:552–570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550}
551
552struct channel *peer_any_active_channel(struct peer *peer, bool *others)
553{
554 struct channel *channel, *ret = NULL;
555
556 list_for_each(&peer->channels, channel, list) {
557 if (!channel_active(channel))
558 continue;
559 /* Already found one? */
560 if (ret) {
561 if (others)
562 *others = true;
563 } else {
564 if (others)
565 *others = false;
566 ret = channel;
567 }
568 }
569 return ret;
570}
571
572struct channel *peer_any_unsaved_channel(struct peer *peer, bool *others)
573{

Callers 10

wallet_commit_channelFunction · 0.70
json_disconnectFunction · 0.70
json_sign_last_txFunction · 0.70
json_dev_failFunction · 0.70
json_dev_reenable_commitFunction · 0.70
param_channel_or_peerFunction · 0.70
wallet_commit_channelFunction · 0.70
connect_failedFunction · 0.70
json_dev_feerateFunction · 0.70
json_dev_quiesceFunction · 0.70

Calls 1

channel_activeFunction · 0.85

Tested by

no test coverage detected