diff options
author | John Newbery <john@johnnewbery.com> | 2020-05-08 13:30:55 -0400 |
---|---|---|
committer | Martin Zumsande <mzumsande@gmail.com> | 2022-01-13 15:55:01 +0100 |
commit | 03cfa1b6035dbcf6a414f9bc432bd9e612801ebb (patch) | |
tree | b0a9bb6b5850f1c761019b2c2a79d9a85e109117 /src | |
parent | 9e64d69bf74c8a381fb59841519cc3736bce14d4 (diff) | |
download | bitcoin-03cfa1b6035dbcf6a414f9bc432bd9e612801ebb.tar.xz |
[refactor] Use uint64_t and std namespace in PoissonNextSend
Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/random.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/random.cpp b/src/random.cpp index 919061e61d..03b8d7530d 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -718,6 +718,6 @@ void RandomInit() std::chrono::microseconds PoissonNextSend(std::chrono::microseconds now, std::chrono::seconds average_interval) { - double unscaled = -log1p(GetRand(1ULL << 48) * -0.0000000000000035527136788 /* -1/2^48 */); + double unscaled = -std::log1p(GetRand(uint64_t{1} << 48) * -0.0000000000000035527136788 /* -1/2^48 */); return now + std::chrono::duration_cast<std::chrono::microseconds>(unscaled * average_interval + 0.5us); } |