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

Function temporary_channel_id

common/channel_id.c:76–83  ·  view source on GitHub ↗

BOLT #2: * * The sending node: *... * - MUST ensure `temporary_channel_id` is unique from any other channel ID * with the same peer. */

Source from the content-addressed store, hash-verified

74 * with the same peer.
75 */
76void temporary_channel_id(struct channel_id *channel_id)
77{
78 size_t i;
79
80 /* Randomness FTW. */
81 for (i = 0; i < sizeof(*channel_id); i++)
82 channel_id->id[i] = pseudorand(256);
83}
84
85
86void towire_channel_id(u8 **pptr, const struct channel_id *channel_id)

Callers 1

json_fundchannel_startFunction · 0.85

Calls 1

pseudorandFunction · 0.70

Tested by

no test coverage detected