From de7200a2abb768e2b2785dcd661bd47221886021 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 9 Nov 2018 01:49:48 -1100 Subject: [PATCH] Fix CCassetstx --- src/cc/CCassetstx.cpp | 2 +- src/cc/dice.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cc/CCassetstx.cpp b/src/cc/CCassetstx.cpp index 4bc1adc42..64b380900 100644 --- a/src/cc/CCassetstx.cpp +++ b/src/cc/CCassetstx.cpp @@ -21,7 +21,7 @@ int64_t AddAssetInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubK std::vector > unspentOutputs; GetCCaddress(cp,coinaddr,pk); SetCCunspents(unspentOutputs,coinaddr); - threshold = total/maxinputs; + threshold = total/(maxinputs!=0?maxinputs:64); for (std::vector >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++) { txid = it->first.txhash; diff --git a/src/cc/dice.cpp b/src/cc/dice.cpp index 5aabccbe9..aa7cb6447 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -493,7 +493,7 @@ void DiceQueue(int32_t iswin,uint64_t sbits,uint256 fundingtxid,uint256 bettxid, } else { - fprintf(stderr,"DiceQueue status bettxid.%s already in list\n",bettxid.GetHex().c_str()); + //fprintf(stderr,"DiceQueue status bettxid.%s already in list\n",bettxid.GetHex().c_str()); //_dicehash_clear(bettxid); } pthread_mutex_unlock(&DICE_MUTEX);