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

Function hash_htlc_key

lightningd/htlc_end.c:10–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include <lightningd/log.h>
9
10size_t hash_htlc_key(const struct htlc_key *k)
11{
12 struct siphash24_ctx ctx;
13 siphash24_init(&ctx, siphash_seed());
14 /* channel doesn't move while in this hash, so we just hash pointer. */
15 siphash24_update(&ctx, &k->channel, sizeof(k->channel));
16 siphash24_u64(&ctx, k->id);
17
18 return siphash24_done(&ctx);
19}
20
21struct htlc_in *find_htlc_in(const struct htlc_in_map *map,
22 const struct channel *channel,

Callers

nothing calls this directly

Calls 5

siphash24_initFunction · 0.85
siphash24_updateFunction · 0.85
siphash24_u64Function · 0.85
siphash24_doneFunction · 0.85
siphash_seedClass · 0.50

Tested by

no test coverage detected