MCPcopy Create free account
hub / github.com/ElementsProject/lightning / get_per_commitment_point

Function get_per_commitment_point

channeld/channeld.c:1650–1664  ·  view source on GitHub ↗

Fetch the requested point. The secret is no longer returned, use * revoke_commitment instead. It is legal to call this on any * commitment (including distant future). */

Source from the content-addressed store, hash-verified

1648 * commitment (including distant future).
1649 */
1650static void get_per_commitment_point(u64 index, struct pubkey *point)
1651{
1652 struct secret *unused;
1653 const u8 *msg;
1654
1655 msg = hsm_req(tmpctx,
1656 take(towire_hsmd_get_per_commitment_point(NULL, index)));
1657
1658 if (!fromwire_hsmd_get_per_commitment_point_reply(tmpctx, msg,
1659 point,
1660 &unused))
1661 status_failed(STATUS_FAIL_HSM_IO,
1662 "Bad per_commitment_point reply %s",
1663 tal_hex(tmpctx, msg));
1664}
1665
1666/* Revoke the specified commitment, the old secret is returned and
1667 * next commitment point are returned. This call is idempotent, it is

Callers 4

peer_reconnectFunction · 0.85
handle_funding_depthFunction · 0.85
init_channelFunction · 0.85

Calls 5

hsm_reqFunction · 0.85
tal_hexFunction · 0.85
status_failedFunction · 0.50

Tested by

no test coverage detected