remove prints

This commit is contained in:
blackjok3r
2018-10-29 11:18:34 +08:00
parent adbb327574
commit 05dc40eb3e

View File

@@ -551,7 +551,7 @@ bool DiceValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &tx)
else if ( tx.vin[1].prevout.hash != tx.vin[2].prevout.hash )
return eval->Invalid("vin0 != vin1 prevout.hash for bet");
else if ( eval->GetTxUnconfirmed(tx.vin[1].prevout.hash,vinTx,hashBlock) == 0 ) {
return eval->Invalid("always should find vin.0, but didnt for wlt");
return eval->Invalid("always should find vin.0, but didnt for wlt");
} else if (hashBlock.IsNull() || !eval->GetBlock(hashBlock, block))
return eval->Invalid(" TX not confirmed! always should find vin.0, but didnt for wlt");
else if ( vinTx.vout.size() < 3 || DecodeDiceOpRet(tx.vin[1].prevout.hash,vinTx.vout[vinTx.vout.size()-1].scriptPubKey,vinsbits,vinfundingtxid,vinhentropy,vinproof) != 'B' )
@@ -560,7 +560,6 @@ bool DiceValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &tx)
return eval->Invalid("sbits or fundingtxid mismatch for wlt");
else if ( fundingPubKey != tx.vout[1].scriptPubKey )
return eval->Invalid("tx.vout[1] != fundingPubKey for wlt");
fprintf(stderr, "vout2.nvalue = %ld\n", vinTx.vout[2].nValue);
if ( funcid == 'L' )
{
//vout.0: funding CC to entropy owner
@@ -579,8 +578,6 @@ bool DiceValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &tx)
//vout.0: funding CC change to entropy owner
//vout.2: normal output to bettor's address
//vout.n-1: opreturn 'W' sbits fundingtxid hentropy proof
fprintf(stderr, "tx fee: %ld\n",txfee);
usleep(5000);
odds = vinTx.vout[2].nValue - txfee;
if ( ConstrainVout(tx.vout[0],1,cp->unspendableCCaddr,0) == 0 )
return eval->Invalid("vout[0] != inputs-txfee for win/timeout");