From 3ecabae36364e905e7821fba3e60aa7f8418de6c Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Wed, 7 Jun 2017 11:34:55 -0700 Subject: Replace more rand() % NUM by randranges --- src/test/pmt_tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/test/pmt_tests.cpp') diff --git a/src/test/pmt_tests.cpp b/src/test/pmt_tests.cpp index 3572505af3..d07a9f3959 100644 --- a/src/test/pmt_tests.cpp +++ b/src/test/pmt_tests.cpp @@ -21,7 +21,7 @@ class CPartialMerkleTreeTester : public CPartialMerkleTree public: // flip one bit in one of the hashes - this should break the authentication void Damage() { - unsigned int n = insecure_rand() % vHash.size(); + unsigned int n = insecure_randrange(vHash.size()); int bit = insecure_randrange(256); *(vHash[n].begin() + (bit>>3)) ^= 1<<(bit&7); } -- cgit v1.2.3