File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ BOOST_AUTO_TEST_CASE(coins_cache_simulation_test)
173
173
}
174
174
175
175
// One every 10 iterations, remove a random entry from the cache
176
- if (insecure_rand () % 10 ) {
176
+ if (insecure_rand () % 10 == 0 ) {
177
177
COutPoint out (txids[insecure_rand () % txids.size ()], 0 );
178
178
int cacheid = insecure_rand () % stack.size ();
179
179
stack[cacheid]->Uncache (out);
@@ -422,13 +422,13 @@ BOOST_AUTO_TEST_CASE(updatecoins_simulation_test)
422
422
}
423
423
424
424
// One every 10 iterations, remove a random entry from the cache
425
- if (utxoset.size () > 1 && insecure_rand () % 30 ) {
425
+ if (utxoset.size () > 1 && insecure_rand () % 30 == 0 ) {
426
426
stack[insecure_rand () % stack.size ()]->Uncache (FindRandomFrom (utxoset)->first );
427
427
}
428
- if (disconnected_coins.size () > 1 && insecure_rand () % 30 ) {
428
+ if (disconnected_coins.size () > 1 && insecure_rand () % 30 == 0 ) {
429
429
stack[insecure_rand () % stack.size ()]->Uncache (FindRandomFrom (disconnected_coins)->first );
430
430
}
431
- if (duplicate_coins.size () > 1 && insecure_rand () % 30 ) {
431
+ if (duplicate_coins.size () > 1 && insecure_rand () % 30 == 0 ) {
432
432
stack[insecure_rand () % stack.size ()]->Uncache (FindRandomFrom (duplicate_coins)->first );
433
433
}
434
434
You can’t perform that action at this time.
0 commit comments