Revoke the specified commitment, the old secret is returned and * next commitment point are returned. This call is idempotent, it is * fine to re-revoke a previously revoked commitment. It is an error * to revoke a commitment beyond the next revocable commitment. */
| 1669 | * to revoke a commitment beyond the next revocable commitment. |
| 1670 | */ |
| 1671 | static void revoke_commitment(u64 index, struct secret *old_secret, struct pubkey *point) |
| 1672 | { |
| 1673 | const u8 *msg; |
| 1674 | |
| 1675 | msg = hsm_req(tmpctx, |
| 1676 | take(towire_hsmd_revoke_commitment_tx(tmpctx, index))); |
| 1677 | |
| 1678 | if (!fromwire_hsmd_revoke_commitment_tx_reply(msg, old_secret, point)) |
| 1679 | status_failed(STATUS_FAIL_HSM_IO, |
| 1680 | "Reading revoke_commitment_tx reply: %s", |
| 1681 | tal_hex(tmpctx, msg)); |
| 1682 | } |
| 1683 | |
| 1684 | /* revoke_index == current index - 1 (usually; not for retransmission) */ |
| 1685 | static u8 *make_revocation_msg(const struct peer *peer, u64 revoke_index, |
no test coverage detected