From 916986cd544bd6dfc2edfcd12690e4c238a63fac Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Mon, 29 Oct 2018 22:55:43 +0800 Subject: [PATCH] enabled utxo selection. --- src/cc/CCtx.cpp | 5 +++++ src/cc/dice.cpp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cc/CCtx.cpp b/src/cc/CCtx.cpp index 71669a0a6..60b52fba0 100644 --- a/src/cc/CCtx.cpp +++ b/src/cc/CCtx.cpp @@ -276,6 +276,11 @@ int32_t CC_vinselect(int32_t *aboveip,int64_t *abovep,int32_t *belowip,int64_t * abovei = belowi = -1; for (above=below=i=0; i 500 ) { + // if ( (rand() % 100) < 80 ) + // continue; + //} if ( (atx_value= utxos[i].nValue) <= 0 ) continue; if ( atx_value == value ) diff --git a/src/cc/dice.cpp b/src/cc/dice.cpp index 39a433efb..c5f289487 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -974,9 +974,9 @@ std::string DiceBet(uint64_t txfee,char *planstr,uint256 fundingtxid,int64_t bet error = strprintf("Dice plan %s illegal bet %.8f: minbet %.8f maxbet %.8f or odds %d vs max.%d\n",planstr,(double)bet/COIN,(double)minbet/COIN,(double)maxbet/COIN,(int32_t)odds,(int32_t)maxodds); return(""); } - int32_t entropytxs=0; //,emptyvar=0; + int32_t entropytxs=0,emptyvar=0; funding = DicePlanFunds(entropyval,entropytxid,sbits,cp,dicepk,fundingtxid,entropytxs,false); - //DicePlanFunds(entropyval,entropytxid,sbits,cp,dicepk,fundingtxid,emptyvar,true); + DicePlanFunds(entropyval,entropytxid,sbits,cp,dicepk,fundingtxid,emptyvar,true); if ( ( funding >= 2*bet*odds+txfee && entropyval != 0 ) ) { if ( entropytxs < 100 ) {