This commit is contained in:
jl777
2018-08-02 03:47:06 -11:00
parent dbf213821f
commit 507520445b

View File

@@ -366,6 +366,7 @@ int32_t DiceIsWinner(uint256 &entropy,uint256 txid,CTransaction tx,CTransaction
//char str[65],str2[65];
if ( DiceIsmine(vinTx.vout[1].scriptPubKey) != 0 && vinTx.vout.size() > 0 && vinTx.vout[0].scriptPubKey.IsPayToCryptoCondition() != 0 )
{
fprintf(stderr,"inside diceiswinner\n");
if ( ((funcid= DecodeDiceOpRet(txid,vinTx.vout[vinTx.vout.size()-1].scriptPubKey,vinsbits,vinfundingtxid,hentropy,vinproof)) == 'E' || funcid == 'W' || funcid == 'L') && sbits == vinsbits && fundingtxid == vinfundingtxid )
{
hentropy2 = DiceHashEntropy(entropy,vinTx.vin[0].prevout.hash);
@@ -926,6 +927,7 @@ std::string DiceBetFinish(int32_t *resultp,uint64_t txfee,char *planstr,uint256
fprintf(stderr,"got bettor entropy\n");
if ( winlosetimeout == 0 || (iswin= DiceIsWinner(hentropyproof,bettxid,betTx,entropyTx,bettorentropy,sbits,minbet,maxbet,maxodds,timeoutblocks,fundingtxid)) != 0 )
{
fprintf(stderr,"inside if/else\n");
winlosetimeout = iswin;
if ( iswin == winlosetimeout )
{