Commit Graph

7 Commits

Author SHA1 Message Date
moneromooo-monero
9f786f0550
epee: allow copying a rolling_median_t object 2022-04-10 18:13:31 +00:00
mj-xmr
da9aa1f7f8
Copyright: Update to 2022 2022-03-04 06:59:20 +01:00
koe
85efc88c1e Fix overflow issue in epee:misc_utils::rolling_median_t and median(), with unit test 2020-07-23 03:36:05 -05:00
SomaticFanatic
5ef0607da6 Update copyright year to 2020
Update copyright year to 2020
2020-05-06 22:36:54 -04:00
Tom Smeding
7b9a420787 Replace std::random_shuffle with std::shuffle
According to [1], std::random_shuffle is deprecated in C++14 and removed
in C++17. Since std::shuffle is available since C++11 as a replacement
and monero already requires C++11, this is a good replacement.

A cryptographically secure random number generator is used in all cases
to prevent people from perhaps copying an insecure std::shuffle call
over to a place where a secure one would be warranted. A form of
defense-in-depth.

[1]: https://en.cppreference.com/w/cpp/algorithm/random_shuffle
2019-08-15 16:33:15 +02:00
moneromooo-monero
de27651f80
use crypto::rand instead of libc rand in a few tests
We don't need secure randomness here, but it should shut coverity up
2019-05-10 14:15:35 +00:00
moneromooo-monero
a4c4a2d8aa
blockchain: keep a rolling long term block weight median 2019-05-02 09:47:01 +00:00