From 44c1c99ffada44345cfd6817abb48ae70254f818 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Mon, 29 Oct 2018 16:01:27 +0800 Subject: [PATCH] fix --- src/cc/CCtx.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/cc/CCtx.cpp b/src/cc/CCtx.cpp index d8c0ceb1d..5c2c42e97 100644 --- a/src/cc/CCtx.cpp +++ b/src/cc/CCtx.cpp @@ -274,16 +274,10 @@ int32_t CC_vinselect(int32_t *aboveip,int64_t *abovep,int32_t *belowip,int64_t * { int32_t i,abovei,belowi; int64_t above,below,gap,atx_value; abovei = belowi = -1; - int loops = 0; - int numtxs = numunspents/2; - int startfrom = rand()%numtxs; for (above=below=i=0; i 300 ) { - if ( loops < startfrom ) - continue; - if ( (rand() % 100) < 75 ) + if ( numunspents > 150 ) { + if ( (rand() % 100) < 80 ) continue; } if ( (atx_value= utxos[i].nValue) <= 0 )