FIXME: We can actually merge these two... */
| 1362 | |
| 1363 | /* FIXME: We can actually merge these two... */ |
| 1364 | bool channel_rcvd_commit(struct channel *channel, const struct htlc ***htlcs) |
| 1365 | { |
| 1366 | int change; |
| 1367 | const enum htlc_state states[] = { RCVD_ADD_REVOCATION, |
| 1368 | RCVD_REMOVE_HTLC, |
| 1369 | RCVD_ADD_HTLC, |
| 1370 | RCVD_REMOVE_REVOCATION }; |
| 1371 | |
| 1372 | status_debug("Received commit"); |
| 1373 | change = change_htlcs(channel, LOCAL, states, ARRAY_SIZE(states), |
| 1374 | htlcs, "rcvd_commit"); |
| 1375 | if (!change) |
| 1376 | return false; |
| 1377 | return true; |
| 1378 | } |
| 1379 | |
| 1380 | bool channel_sending_revoke_and_ack(struct channel *channel) |
| 1381 | { |