These helpers invoke the underlying full_channel API and then drive * the full commitment dance (the four steps of sending_commit -> * recv_revoke_and_ack -> recv_commit -> sending_revoke_and_ack) * in the correct opener vs. accepter order. */
| 55 | * in the correct opener vs. accepter order. |
| 56 | */ |
| 57 | static void exchange_commits(struct channel *channel, enum side side, const struct htlc ***changed_htlcs) |
| 58 | { |
| 59 | if (side == LOCAL) { |
| 60 | channel_sending_commit(channel, changed_htlcs); |
| 61 | channel_rcvd_revoke_and_ack(channel, changed_htlcs); |
| 62 | channel_rcvd_commit(channel, changed_htlcs); |
| 63 | channel_sending_revoke_and_ack(channel); |
| 64 | } else { |
| 65 | channel_rcvd_commit(channel, changed_htlcs); |
| 66 | channel_sending_revoke_and_ack(channel); |
| 67 | channel_sending_commit(channel, changed_htlcs); |
| 68 | channel_rcvd_revoke_and_ack(channel, changed_htlcs); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | /* Randomize the commitment dance order. */ |
| 73 | static void fuzz_exchange_commits(struct channel *channel, const struct htlc ***changed_htlcs, |
no test coverage detected