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

Function pseudorand_double_

common/pseudorand.c:56–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56double pseudorand_double_(uint64_t *offset)
57{
58 init_if_needed();
59
60 if (randbytes_overridden()) {
61 uint64_t rand;
62 randbytes_(&rand, sizeof(rand), offset);
63 return rand / (double)UINT64_MAX;
64 }
65 return isaac64_next_double(&isaac64);
66}
67
68const struct siphash_seed *siphash_seed(void)
69{

Callers

nothing calls this directly

Calls 4

init_if_neededFunction · 0.85
isaac64_next_doubleFunction · 0.85
randbytes_overriddenFunction · 0.70
randbytes_Function · 0.70

Tested by

no test coverage detected