Merge branch 'jl777' into FSM
This commit is contained in:
@@ -1347,7 +1347,7 @@ std::string DiceCreateFunding(uint64_t txfee,char *planstr,int64_t funds,int64_t
|
||||
memset(&zero,0,sizeof(zero));
|
||||
if ( (cp= Diceinit(fundingPubKey,zero,&C,planstr,txfee,mypk,dicepk,sbits,a,b,c,d)) == 0 )
|
||||
{
|
||||
CCerror = "Diceinit error in create funding";
|
||||
CCerror = "Diceinit error in create funding, is your transaction confirmed?";
|
||||
fprintf(stderr,"%s\n", CCerror.c_str() );
|
||||
return("");
|
||||
}
|
||||
@@ -1372,8 +1372,10 @@ std::string DiceAddfunding(uint64_t txfee,char *planstr,uint256 fundingtxid,int6
|
||||
fprintf(stderr,"%s\n", CCerror.c_str() );
|
||||
return("");
|
||||
}
|
||||
if ( (cp= Diceinit(fundingPubKey,fundingtxid,&C,planstr,txfee,mypk,dicepk,sbits,minbet,maxbet,maxodds,timeoutblocks)) == 0 )
|
||||
if ( (cp= Diceinit(fundingPubKey,fundingtxid,&C,planstr,txfee,mypk,dicepk,sbits,minbet,maxbet,maxodds,timeoutblocks)) == 0 ) {
|
||||
CCerror = "Diceinit error in add funding, is your transaction confirmed?";
|
||||
return("");
|
||||
}
|
||||
scriptPubKey = CScript() << ParseHex(HexStr(mypk)) << OP_CHECKSIG;
|
||||
if ( 0 )
|
||||
{
|
||||
@@ -1420,7 +1422,7 @@ std::string DiceBet(uint64_t txfee,char *planstr,uint256 fundingtxid,int64_t bet
|
||||
return("");
|
||||
}
|
||||
if ( (cp= Diceinit(fundingPubKey,fundingtxid,&C,planstr,txfee,mypk,dicepk,sbits,minbet,maxbet,maxodds,timeoutblocks)) == 0 ) {
|
||||
CCerror = "error in Diceinit";
|
||||
CCerror = "Diceinit error in bet, is your transaction confirmed?";
|
||||
return("");
|
||||
}
|
||||
if ( bet < minbet || bet > maxbet || odds > maxodds )
|
||||
@@ -1473,7 +1475,7 @@ std::string DiceBetFinish(uint8_t &funcid,uint256 &entropyused,int32_t &entropyv
|
||||
//char str[65]; fprintf(stderr,"DiceBetFinish.%s %s\n",planstr,uint256_str(str,bettxid));
|
||||
if ( (cp= Diceinit(fundingPubKey,fundingtxid,&C,planstr,txfee,mypk,dicepk,sbits,minbet,maxbet,maxodds,timeoutblocks)) == 0 )
|
||||
{
|
||||
CCerror = "Diceinit error in finish";
|
||||
CCerror = "Diceinit error in finish, is your transaction confirmed?";
|
||||
fprintf(stderr,"%s\n", CCerror.c_str() );
|
||||
return("");
|
||||
}
|
||||
@@ -1637,7 +1639,8 @@ double DiceStatus(uint64_t txfee,char *planstr,uint256 fundingtxid,uint256 bettx
|
||||
CScript fundingPubKey,scriptPubKey; CTransaction spenttx,betTx,entropyTx; uint256 hentropyproof,entropyused,hash,proof,txid,hashBlock,spenttxid,bettorentropy; CPubKey mypk,dicepk,fundingpk; struct CCcontract_info *cp,C; int32_t i,entropyvout,flag,win,loss,duplicate=0,result,iswin,vout,n=0; int64_t minbet,maxbet,maxodds,timeoutblocks,sum=0; uint64_t sbits,refsbits; char coinaddr[64]; std::string res; uint8_t funcid;
|
||||
if ( (cp= Diceinit(fundingPubKey,fundingtxid,&C,planstr,txfee,mypk,dicepk,refsbits,minbet,maxbet,maxodds,timeoutblocks)) == 0 )
|
||||
{
|
||||
CCerror = "Diceinit error in status";
|
||||
CCerror = "Diceinit error in status, is your transaction confirmed?";
|
||||
fprintf(stderr,"%s\n", CCerror.c_str() );
|
||||
return(0.);
|
||||
}
|
||||
win = loss = 0;
|
||||
|
||||
Reference in New Issue
Block a user