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

Function pubkey_for_node

devtools/gossmap-compress.c:278–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278static void pubkey_for_node(u64 nodeidx, struct pubkey *key,
279 const struct pubkey **node_ids)
280{
281 struct secret seckey;
282
283 if (nodeidx < tal_count(node_ids) && node_ids[nodeidx]) {
284 *key = *node_ids[nodeidx];
285 return;
286 }
287
288 memset(&seckey, 1, sizeof(seckey));
289 memcpy(&seckey, &nodeidx, sizeof(nodeidx));
290 if (!pubkey_from_secret(&seckey, key))
291 abort();
292}
293
294static void write_msg_to_gstore(int outfd, const u8 *msg TAKES)
295{

Callers 3

write_announceFunction · 0.85
write_updateFunction · 0.85
mainFunction · 0.85

Calls 2

pubkey_from_secretFunction · 0.85
abortFunction · 0.85

Tested by

no test coverage detected