revoke_index == current index - 1 (usually; not for retransmission) */
| 1671 | |
| 1672 | /* revoke_index == current index - 1 (usually; not for retransmission) */ |
| 1673 | static u8 *make_revocation_msg(const struct peer *peer, u64 revoke_index, |
| 1674 | struct pubkey *point) |
| 1675 | { |
| 1676 | struct secret old_commit_secret; |
| 1677 | |
| 1678 | /* Now that the master has persisted the new commitment advance the HSMD |
| 1679 | * and fetch the revocation secret for the old one. |
| 1680 | * |
| 1681 | * After HSM_VERSION 5 we explicitly revoke the commitment in case |
| 1682 | * the original revoke didn't complete. The hsmd_revoke_commitment_tx |
| 1683 | * call is idempotent ... |
| 1684 | */ |
| 1685 | revoke_commitment(revoke_index, &old_commit_secret, point); |
| 1686 | |
| 1687 | return towire_revoke_and_ack(peer, &peer->channel_id, &old_commit_secret, |
| 1688 | point); |
| 1689 | } |
| 1690 | |
| 1691 | /* Convert changed htlcs into parts which lightningd expects. */ |
| 1692 | static void marshall_htlc_info(const tal_t *ctx, |
no test coverage detected