|
|
@ -969,9 +969,9 @@ std::string DiceBetFinish(int32_t *resultp,uint64_t txfee,char *planstr,uint256 |
|
|
|
return(""); |
|
|
|
} |
|
|
|
CCchange = betTx.vout[0].nValue + betTx.vout[1].nValue; |
|
|
|
fundsneeded = txfee + odds*betTx.vout[1].nValue; |
|
|
|
if ( CCchange >= fundsneeded+betTx.vout[1].nValue ) |
|
|
|
CCchange -= (fundsneeded + betTx.vout[1].nValue); |
|
|
|
fundsneeded = txfee + (odds+1)*betTx.vout[1].nValue; |
|
|
|
if ( CCchange >= fundsneeded ) |
|
|
|
CCchange -= fundsneeded; |
|
|
|
else if ( (inputs= AddDiceInputs(cp,mtx,dicepk,fundsneeded,60,sbits,fundingtxid)) > 0 ) |
|
|
|
{ |
|
|
|
if ( inputs > fundsneeded ) |
|
|
|