FIXME: We can actually merge these two... */
| 1513 | |
| 1514 | /* FIXME: We can actually merge these two... */ |
| 1515 | bool channel_rcvd_commit(struct channel *channel, const struct htlc ***htlcs) |
| 1516 | { |
| 1517 | int change; |
| 1518 | const enum htlc_state states[] = { RCVD_ADD_REVOCATION, |
| 1519 | RCVD_REMOVE_HTLC, |
| 1520 | RCVD_ADD_HTLC, |
| 1521 | RCVD_REMOVE_REVOCATION }; |
| 1522 | |
| 1523 | status_debug("Received commit"); |
| 1524 | change = change_htlcs(channel, LOCAL, states, ARRAY_SIZE(states), |
| 1525 | htlcs, "rcvd_commit"); |
| 1526 | if (!change) |
| 1527 | return false; |
| 1528 | return true; |
| 1529 | } |
| 1530 | |
| 1531 | bool channel_sending_revoke_and_ack(struct channel *channel) |
| 1532 | { |