diff --git a/src/cc/CCtx.cpp b/src/cc/CCtx.cpp index 66a5d4388..bea26e4a2 100644 --- a/src/cc/CCtx.cpp +++ b/src/cc/CCtx.cpp @@ -52,7 +52,7 @@ std::string FinalizeCCTx(uint64_t CCmask,struct CCcontract_info *cp,CMutableTran if ( (n= mtx.vin.size()) > 64 ) { fprintf(stderr,"FinalizeCCTx: %d is too many vins\n",n); - return(0); + return("0"); } Myprivkey(myprivkey); unspendablepk = GetUnspendable(cp,unspendablepriv); @@ -147,7 +147,7 @@ std::string FinalizeCCTx(uint64_t CCmask,struct CCcontract_info *cp,CMutableTran std::string strHex = EncodeHexTx(mtx); if ( strHex.size() > 0 ) return(strHex); - else return(0); + else return("0"); } void SetCCunspents(std::vector > &unspentOutputs,char *coinaddr) diff --git a/src/cc/dice.cpp b/src/cc/dice.cpp index a02fc514f..a3877c8b1 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -982,8 +982,8 @@ std::string DiceBetFinish(int32_t *resultp,uint64_t txfee,char *planstr,uint256 if ( winlosetimeout != 0 ) hentropy = DiceHashEntropy(entropy,mtx.vin[0].prevout.hash); *resultp = 1; - //char str[65],str2[65]; - //fprintf(stderr,"iswin.%d house entropy %s vs bettor %s\n",iswin,uint256_str(str,hentropyproof),uint256_str(str2,bettorentropy)); + char str[65],str2[65]; + fprintf(stderr,"iswin.%d house entropy %s vs bettor %s\n",iswin,uint256_str(str,hentropyproof),uint256_str(str2,bettorentropy)); return(FinalizeCCTx(0,cp,mtx,fundingpk,txfee,EncodeDiceOpRet(funcid,sbits,fundingtxid,hentropy,hentropyproof))); } else fprintf(stderr,"iswin.%d does not match.%d\n",iswin,winlosetimeout); } @@ -993,6 +993,7 @@ std::string DiceBetFinish(int32_t *resultp,uint64_t txfee,char *planstr,uint256 return("0"); } } + fprintf(stderr,"couldnt find bettx or entropytx\n"); return("0"); } diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index d81160deb..4942cfb8b 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -5248,7 +5248,6 @@ UniValue dicefinish(const UniValue& params, bool fHelp) const CKeyStore& keystore = *pwalletMain; LOCK2(cs_main, pwalletMain->cs_wallet); name = (char *)params[0].get_str().c_str(); -fprintf(stderr,"name %s\n",name); fundingtxid = Parseuint256((char *)params[1].get_str().c_str()); bettxid = Parseuint256((char *)params[2].get_str().c_str()); hex = DiceBetFinish(&r,0,name,fundingtxid,bettxid,1);