mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-07 14:29:33 +01:00
6a26b0c18d
We have a seed, which is for (future!) unit testing consistency. This makes it change every time, so our pay_direct_test is more useful. I tried restarting the noed around the loop, but it tended to fail rebinding to the same port for some reason? Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
22 lines
488 B
C
22 lines
488 B
C
#ifndef LIGHTNING_COMMON_PSEUDORAND_H
|
|
#define LIGHTNING_COMMON_PSEUDORAND_H
|
|
#include "config.h"
|
|
#include <stdint.h>
|
|
|
|
/**
|
|
* pseudorand - pseudo (guessable!) random number between 0 and max-1.
|
|
*/
|
|
uint64_t pseudorand(uint64_t max);
|
|
|
|
/**
|
|
* pseudorand - pseudo (guessable!) random number between 0 and UINT64_MAX.
|
|
*/
|
|
uint64_t pseudorand_u64(void);
|
|
|
|
/**
|
|
* Get the siphash seed for hash tables.
|
|
*/
|
|
const struct siphash_seed *siphash_seed(void);
|
|
|
|
#endif /* LIGHTNING_COMMON_PSEUDORAND_H */
|