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

Function get_per_commitment_point

channeld/channeld.c:1568–1582  ·  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

1566 * commitment (including distant future).
1567 */
1568static void get_per_commitment_point(u64 index, struct pubkey *point)
1569{
1570 struct secret *unused;
1571 const u8 *msg;
1572
1573 msg = hsm_req(tmpctx,
1574 take(towire_hsmd_get_per_commitment_point(NULL, index)));
1575
1576 if (!fromwire_hsmd_get_per_commitment_point_reply(tmpctx, msg,
1577 point,
1578 &unused))
1579 status_failed(STATUS_FAIL_HSM_IO,
1580 "Bad per_commitment_point reply %s",
1581 tal_hex(tmpctx, msg));
1582}
1583
1584/* Revoke the specified commitment, the old secret is returned and
1585 * 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