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

Function get_channel_basepoints

lightningd/channel.c:100–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void get_channel_basepoints(struct lightningd *ld,
101 const struct node_id *peer_id,
102 const u64 dbid,
103 struct basepoints *local_basepoints,
104 struct pubkey *local_funding_pubkey)
105{
106 u8 *msg;
107
108 assert(dbid != 0);
109 msg = towire_hsmd_get_channel_basepoints(NULL, peer_id, dbid);
110 if (!wire_sync_write(ld->hsm_fd, take(msg)))
111 fatal("Could not write to HSM: %s", strerror(errno));
112
113 msg = wire_sync_read(tmpctx, ld->hsm_fd);
114 if (!fromwire_hsmd_get_channel_basepoints_reply(msg, local_basepoints,
115 local_funding_pubkey))
116 fatal("HSM gave bad hsm_get_channel_basepoints_reply %s",
117 tal_hex(msg, msg));
118}
119
120static void destroy_inflight(struct channel_inflight *inflight)
121{

Callers 3

new_unsaved_channelFunction · 0.70
new_uncommitted_channelFunction · 0.70
stub_chanFunction · 0.70

Calls 6

tal_hexFunction · 0.85
fatalFunction · 0.70
wire_sync_writeFunction · 0.50
wire_sync_readFunction · 0.50

Tested by

no test coverage detected