| 1598 | } |
| 1599 | |
| 1600 | bool 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 | |
| 1624 | bool channel_force_htlcs(struct channel *channel, |
| 1625 | const struct existing_htlc **htlcs) |
no test coverage detected