diff options
| author | Matt Corallo <[email protected]> | 2019-11-23 11:42:23 -0500 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2019-11-23 16:06:34 -0500 |
| commit | 02d8c56a18b9a2960888d6ec1209955105bae847 (patch) | |
| tree | 9013a23918ed55059a39fa56ae93ef6951456607 /src/random.h | |
| parent | Merge #17539: doc: Update and improve Developer Notes (diff) | |
| download | discoin-02d8c56a18b9a2960888d6ec1209955105bae847.tar.xz discoin-02d8c56a18b9a2960888d6ec1209955105bae847.zip | |
Seed RNG with precision timestamps on receipt of net messages.
Diffstat (limited to 'src/random.h')
| -rw-r--r-- | src/random.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/random.h b/src/random.h index 2d8ab085e..b6e70fcb1 100644 --- a/src/random.h +++ b/src/random.h @@ -90,6 +90,14 @@ void GetStrongRandBytes(unsigned char* buf, int num) noexcept; void RandAddPeriodic(); /** + * Gathers entropy from the low bits of the time at which events occur. Should + * be called with a uint32_t describing the event at the time an event occurs. + * + * Thread-safe. + */ +void RandAddEvent(const uint32_t event_info); + +/** * Fast randomness source. This is seeded once with secure random data, but * is completely deterministic and does not gather more entropy after that. * |