This commit is contained in:
blackjok3r
2018-10-28 12:21:34 +08:00
parent b2ec72ec89
commit 474065ed99

View File

@@ -14,7 +14,6 @@
******************************************************************************/
#include "CCdice.h"
bool Eval::GetBlock(uint256 hash, CBlockIndex& blockIdx);
// timeout
@@ -549,7 +548,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 ) {
if (hashBlock.IsNull() || !GetBlock(hashBlock, block))
if (hashBlock.IsNull() || !Eval::GetBlock(hashBlock, block))
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' )