diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp --- a/src/test/coins_tests.cpp +++ b/src/test/coins_tests.cpp @@ -182,7 +182,7 @@ } // One every 10 iterations, remove a random entry from the cache - if (InsecureRandRange(10)) { + if (InsecureRandRange(10) == 0) { COutPoint out(txids[insecure_rand() % txids.size()], 0); int cacheid = insecure_rand() % stack.size(); stack[cacheid]->Uncache(out); @@ -447,15 +447,15 @@ } // One every 10 iterations, remove a random entry from the cache - if (utxoset.size() > 1 && InsecureRandRange(30)) { + if (utxoset.size() > 1 && InsecureRandRange(30) == 0) { stack[insecure_rand() % stack.size()]->Uncache( FindRandomFrom(utxoset)->first); } - if (disconnected_coins.size() > 1 && InsecureRandRange(30)) { + if (disconnected_coins.size() > 1 && InsecureRandRange(30) == 0) { stack[insecure_rand() % stack.size()]->Uncache( FindRandomFrom(disconnected_coins)->first); } - if (duplicate_coins.size() > 1 && InsecureRandRange(30)) { + if (duplicate_coins.size() > 1 && InsecureRandRange(30) == 0) { stack[insecure_rand() % stack.size()]->Uncache( FindRandomFrom(duplicate_coins)->first); }