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

Function pending_updates

channeld/full_channel.c:1600–1622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1598}
1599
1600bool pending_updates(const struct channel *channel, enum side side)
1601{
1602 struct htlc_map_iter it;
1603 const struct htlc *htlc;
1604
1605 /* Initiator might have fee changes or blockheight updates in play. */
1606 if (side == channel->opener) {
1607 if (!feerate_changes_done(channel->fee_states, false))
1608 return true;
1609
1610 if (!blockheight_changes_done(channel->blockheight_states, false))
1611 return true;
1612 }
1613
1614 /* Are we still waiting for the side to send something? */
1615 for (htlc = htlc_map_first(channel->htlcs, &it);
1616 htlc;
1617 htlc = htlc_map_next(channel->htlcs, &it)) {
1618 if (htlc_state_flags(htlc->state) & HTLC_FLAG(side, HTLC_F_WILL_SEND))
1619 return true;
1620 }
1621 return false;
1622}
1623
1624bool channel_force_htlcs(struct channel *channel,
1625 const struct existing_htlc **htlcs)

Callers 2

maybe_send_stfuFunction · 0.85
handle_stfuFunction · 0.85

Calls 3

feerate_changes_doneFunction · 0.85
blockheight_changes_doneFunction · 0.85
htlc_state_flagsFunction · 0.50

Tested by

no test coverage detected