From 6756a2f4f2f39aaee88174ad81f3e84d52d895a2 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Mon, 29 Oct 2018 20:00:04 +0800 Subject: [PATCH] done --- src/cc/dice.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/cc/dice.cpp b/src/cc/dice.cpp index afebfd4e4..67d251bcc 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -413,10 +413,8 @@ int32_t DiceIsWinner(uint256 &entropy,uint256 txid,CTransaction tx,CTransaction hentropy2 = DiceHashEntropy(entropy,vinTx.vin[0].prevout.hash); if ( hentropy == hentropy2 ) { - char str[65]; - fprintf(stderr, "%s something \n",uint256_str(str,entropy)); winnings = DiceCalc(tx.vout[1].nValue,tx.vout[2].nValue,minbet,maxbet,maxodds,timeoutblocks,entropy,bettorentropy); - fprintf(stderr,"%s winnings %.8f bet %.8f at odds %d:1\n",uint256_str(str,tx.GetHash()),(double)winnings/COIN,(double)tx.vout[1].nValue/COIN,(int32_t)(tx.vout[2].nValue-10000)); + char str[65]; fprintf(stderr,"%s winnings %.8f bet %.8f at odds %d:1\n",uint256_str(str,tx.GetHash()),(double)winnings/COIN,(double)tx.vout[1].nValue/COIN,(int32_t)(tx.vout[2].nValue-10000)); //fprintf(stderr,"I am house entropy %.8f entropy.(%s) vs %s -> winnings %.8f\n",(double)vinTx.vout[0].nValue/COIN,uint256_str(str,entropy),uint256_str(str2,hash),(double)winnings/COIN); if ( winnings == 0 ) { @@ -736,7 +734,9 @@ int64_t DicePlanFunds(uint64_t &entropyval,uint256 &entropytxid,uint64_t refsbit entropytxid = txid; entropyval = tx.vout[0].nValue; first = 1; - fprintf(stderr, "chosen entropy on loop: %d\n",loops); + if (random) { + fprintf(stderr, "chosen entropy on loop: %d\n",loops); + } } else { @@ -1202,8 +1202,7 @@ double DiceStatus(uint64_t txfee,char *planstr,uint256 fundingtxid,uint256 bettx } else return(0.); } error = "didnt find dicefinish tx"; - } - error = res; + } else error = res; return(-1.); } return(0.);