From 20441562c3a70f0989832c8eadeda155908f4dc3 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Thu, 1 Nov 2018 17:05:31 +0800 Subject: [PATCH] fix --- src/cc/dice.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/cc/dice.cpp b/src/cc/dice.cpp index a7c412e1c..c5bebeba0 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -551,17 +551,8 @@ bool DiceValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &tx) return eval->Invalid("vin0 or vin1 normal vin for bet"); else if ( tx.vin[1].prevout.hash != tx.vin[2].prevout.hash ) return eval->Invalid("vin0 != vin1 prevout.hash for bet"); -<<<<<<< HEAD - else if ( eval->GetTxUnconfirmed(tx.vin[1].prevout.hash,vinTx,hashBlock) == 0 ) { - char str[65],str2[65],str3[65]; - fprintf(stderr, "txid.%s tx.%s hashBlock.%s\n",uint256_str(str,txid),uint256_str(str2,tx.vin[1].prevout.hash),uint256_str(str3,hashBlock)); - return eval->Invalid("always should find looking 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 ( eval->GetTxUnconfirmed(tx.vin[1].prevout.hash,vinTx,hashBlock) == 0 ) - return eval->Invalid("always should find looking vin.0, but didnt for wlt"); ->>>>>>> 19d614c8344b70a0d4a7da8620a2dd1168016abc + return eval->Invalid("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' ) return eval->Invalid("not betTx for vin0/1 for wlt"); else if ( sbits != vinsbits || fundingtxid != vinfundingtxid ) @@ -597,21 +588,12 @@ bool DiceValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &tx) { fprintf(stderr,"inputs %.8f != outputs %.8f + %.8f\n",(double)inputs/COIN,(double)outputs/COIN,(double)tx.vout[2].nValue/COIN); return eval->Invalid("CC funds mismatch for win/timeout"); -<<<<<<< HEAD } else if ( tx.vout[3].scriptPubKey != fundingPubKey ) { if ( tx.vout[3].scriptPubKey.size() == 0 || ((uint8_t *)tx.vout[3].scriptPubKey.data())[0] != 0x6a ) return eval->Invalid("vout[3] not send to fundingPubKey for win/timeout"); } -======= - } - else if ( tx.vout[3].scriptPubKey != fundingPubKey ) - { - if ( tx.vout[3].scriptPubKey.size() == 0 || ((uint8_t *)tx.vout[3].scriptPubKey.data())[0] != 0x6a ) - return eval->Invalid("vout[3] not send to fundingPubKey for win/timeout"); - } ->>>>>>> 19d614c8344b70a0d4a7da8620a2dd1168016abc iswin = (funcid == 'W'); } if ( iswin != 0 )