mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-30 04:51:13 +02:00
random: Improve RandomMixin::randbits
The previous randbits code would, when requesting more randomness than available in its random bits buffer, discard the remaining entropy and generate new. Benchmarks show that it's usually better to first consume the existing randomness and only then generate new ones. This adds some complexity to randbits, but it doesn't weigh up against the reduced need to generate more randomness.
This commit is contained in:
@@ -76,3 +76,4 @@ shift-base:crypto/
|
||||
shift-base:streams.h
|
||||
shift-base:FormatHDKeypath
|
||||
shift-base:xoroshiro128plusplus.h
|
||||
shift-base:RandomMixin<*>::randbits
|
||||
|
Reference in New Issue
Block a user