-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
random: port some upstream changes #2696
Commits on Aug 6, 2023
-
[move] Move PoissonNextSend to src/random and update comment
PoissonNextSend is used by net and net_processing and is stateless, so place it in the utility random.cpp translation unit.
Configuration menu - View commit details
-
Copy full SHA for 28303b6 - Browse repository at this point
Copy the full SHA 28303b6View commit details -
[refactor] Use uint64_t and std namespace in PoissonNextSend
Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e5dc985 - Browse repository at this point
Copy the full SHA e5dc985View commit details -
scripted-diff: replace PoissonNextSend with GetExponentialRand
This distribution is used for more than just the next inv send, so make the name more generic. Also rename to "exponential" to avoid the confusion that this is a poisson distribution. -BEGIN VERIFY SCRIPT- ren() { sed -i "s/\<$1\>/$2/g" $(git grep -l "$1" ./src) ; } ren PoissonNextSend GetExponentialRand ren "a poisson timer" "an exponential timer" -END VERIFY SCRIPT-
Configuration menu - View commit details
-
Copy full SHA for 0094a0b - Browse repository at this point
Copy the full SHA 0094a0bView commit details -
random: use arc4random on OpenBSD
Following best practices on OpenBSD. The getentropy(2) man page states: "getentropy() is not intended for regular code; please use the arc4random(3) family of functions instead."
Configuration menu - View commit details
-
Copy full SHA for f2589ba - Browse repository at this point
Copy the full SHA f2589baView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce75abc - Browse repository at this point
Copy the full SHA ce75abcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d784b2 - Browse repository at this point
Copy the full SHA 8d784b2View commit details -
refactor: make GetRand a template, remove GetRandInt
Co-authored-by: div72 <noreply@div72.xyz>
Configuration menu - View commit details
-
Copy full SHA for 7191dfd - Browse repository at this point
Copy the full SHA 7191dfdView commit details -
util: remove unneeded GetPerformanceCounter
Rationale: This duplicate of GetPerformanceCounter was only used in src/addrdb.cpp, with 7191dfd removing this we can safely remove this function.
Configuration menu - View commit details
-
Copy full SHA for 46f29ab - Browse repository at this point
Copy the full SHA 46f29abView commit details