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

Function derive_channel_id

common/channel_id.c:9–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <wire/wire.h>
8
9void derive_channel_id(struct channel_id *channel_id,
10 const struct bitcoin_outpoint *outpoint)
11{
12 BUILD_ASSERT(sizeof(*channel_id) == sizeof(outpoint->txid));
13 memcpy(channel_id, &outpoint->txid, sizeof(*channel_id));
14 channel_id->id[sizeof(*channel_id)-2] ^= outpoint->n >> 8;
15 channel_id->id[sizeof(*channel_id)-1] ^= outpoint->n;
16}
17
18void derive_channel_id_v2(struct channel_id *channel_id,
19 const struct pubkey *basepoint_1,

Callers 8

update_v1_channelidFunction · 0.50
mainFunction · 0.50
opening_funder_finishedFunction · 0.50
opening_fundee_finishedFunction · 0.50
runFunction · 0.50
fundee_channelFunction · 0.50
mainFunction · 0.50

Calls

no outgoing calls

Tested by 1

mainFunction · 0.40