mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
gossipd: increase randomness in route selection.
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>
This commit is contained in:
committed by
Christian Decker
parent
38a2f6c616
commit
6a26b0c18d
@@ -37,6 +37,13 @@ uint64_t pseudorand(uint64_t max)
|
||||
return isaac64_next_uint(&isaac64, max);
|
||||
}
|
||||
|
||||
uint64_t pseudorand_u64(void)
|
||||
{
|
||||
init_if_needed();
|
||||
|
||||
return isaac64_next_uint64(&isaac64);
|
||||
}
|
||||
|
||||
const struct siphash_seed *siphash_seed(void)
|
||||
{
|
||||
init_if_needed();
|
||||
|
||||
Reference in New Issue
Block a user