Test
This commit is contained in:
@@ -246,10 +246,13 @@ bool DiceValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx)
|
|||||||
fprintf(stderr,"got bet txid\n");
|
fprintf(stderr,"got bet txid\n");
|
||||||
if ( eval->GetTxUnconfirmed(tx.vin[0].prevout.hash,vinTx,hashBlock) == 0 )
|
if ( eval->GetTxUnconfirmed(tx.vin[0].prevout.hash,vinTx,hashBlock) == 0 )
|
||||||
return eval->Invalid("always should find vin.0, but didnt");
|
return eval->Invalid("always should find vin.0, but didnt");
|
||||||
else if ( DiceIsmine(vinTx.vout[1].scriptPubKey) != 0 )
|
else if ( DiceIsmine(vinTx.vout[1].scriptPubKey) != 0 && vinTx.vout.size() > 0 )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"I am house entropy %.8f\n",(double)vinTx.vout[0].nValue/COIN);
|
uint64_t vinbits; uint256 vinfundingtxid,hentropy; char str[65];
|
||||||
|
if ( DecodeDiceOpRet(txid,vinTx.vout[vinTx.vout.size()-1].scriptPubKey,vinsbits,vinfundingtxid,hentropy)) == 'E' && sbits == vinsbits && fundingtxid == vinfundingtxid )
|
||||||
|
{
|
||||||
|
fprintf(stderr,"I am house entropy %.8f hentropy.(%s)\n",(double)vinTx.vout[0].nValue/COIN,uint256_str(str,hentropy));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return eval->Invalid("dont confirm bet during debug");
|
return eval->Invalid("dont confirm bet during debug");
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user