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

Function make_peer_node

tests/plugins/channeld_fakenet.c:259–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257}
258
259static struct node *make_peer_node(const tal_t *ctx)
260{
261 struct node *n = tal(ctx, struct node);
262 struct pubkey pubkey;
263
264 /* l2's secret key */
265 if (!hex_decode("0c633a7c17c701a0980158f5483035e01fa8bd091b47fadf2e86e589a9f93fca",
266 strlen("0c633a7c17c701a0980158f5483035e01fa8bd091b47fadf2e86e589a9f93fca"),
267 &n->p, sizeof(n->p)))
268 abort();
269 pubkey_from_privkey(&n->p, &pubkey);
270 node_id_from_pubkey(&n->id, &pubkey);
271 n->name = tal_fmt(n, "lightningd-2");
272
273 return n;
274}
275
276/* expected_id is NULL for initial node (aka l2) */
277static struct node *get_current_node(struct info *info,

Callers 1

mainFunction · 0.85

Calls 4

hex_decodeFunction · 0.85
abortFunction · 0.85
pubkey_from_privkeyFunction · 0.85
node_id_from_pubkeyFunction · 0.85

Tested by

no test coverage detected