This commit is contained in:
@@ -463,7 +463,7 @@ int32_t DiceIsWinner(uint256 &entropy,uint256 txid,CTransaction tx,CTransaction
|
|||||||
if ( hentropy == hentropy2 )
|
if ( hentropy == hentropy2 )
|
||||||
{
|
{
|
||||||
winnings = DiceCalc(tx.vout[1].nValue,tx.vout[2].nValue,minbet,maxbet,maxodds,timeoutblocks,entropy,bettorentropy);
|
winnings = DiceCalc(tx.vout[1].nValue,tx.vout[2].nValue,minbet,maxbet,maxodds,timeoutblocks,entropy,bettorentropy);
|
||||||
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));
|
//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);
|
//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 )
|
if ( winnings == 0 )
|
||||||
{
|
{
|
||||||
@@ -1179,7 +1179,7 @@ std::string DiceBetFinish(uint256 &entropyused,int32_t *resultp,uint64_t txfee,c
|
|||||||
mtx.vout.push_back(MakeCC1vout(cp->evalcode,betTx.vout[0].nValue + betTx.vout[1].nValue,dicepk));
|
mtx.vout.push_back(MakeCC1vout(cp->evalcode,betTx.vout[0].nValue + betTx.vout[1].nValue,dicepk));
|
||||||
mtx.vout.push_back(CTxOut(txfee,fundingPubKey));
|
mtx.vout.push_back(CTxOut(txfee,fundingPubKey));
|
||||||
}
|
}
|
||||||
fprintf(stderr,"make tx.%c\n",funcid);
|
//fprintf(stderr,"make tx.%c\n",funcid);
|
||||||
if ( funcid == 'L' || funcid == 'W' ) // dealernode only
|
if ( funcid == 'L' || funcid == 'W' ) // dealernode only
|
||||||
hentropy = DiceHashEntropy(entropy,mtx.vin[0].prevout.hash);
|
hentropy = DiceHashEntropy(entropy,mtx.vin[0].prevout.hash);
|
||||||
*resultp = 1;
|
*resultp = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user