Fix mining deadlock
This commit is contained in:
@@ -259,18 +259,18 @@ bool ProcessCC(struct CCcontract_info *cp,Eval* eval, std::vector<uint8_t> param
|
||||
//txid = ctx.GetHash();
|
||||
//if ( txid == cp->prevtxid )
|
||||
// return(true);
|
||||
fprintf(stderr,"process CC %02x\n",cp->evalcode);
|
||||
//fprintf(stderr,"process CC %02x\n",cp->evalcode);
|
||||
if ( paramsNull.size() != 0 ) // Don't expect params
|
||||
return eval->Invalid("Cannot have params");
|
||||
else if ( ctx.vout.size() == 0 )
|
||||
return eval->Invalid("no-vouts");
|
||||
else if ( (*cp->validate)(cp,eval,ctx) != 0 )
|
||||
{
|
||||
fprintf(stderr,"done CC %02x\n",cp->evalcode);
|
||||
//fprintf(stderr,"done CC %02x\n",cp->evalcode);
|
||||
//cp->prevtxid = txid;
|
||||
return(true);
|
||||
}
|
||||
fprintf(stderr,"invalid CC %02x\n",cp->evalcode);
|
||||
//fprintf(stderr,"invalid CC %02x\n",cp->evalcode);
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -1018,7 +1018,7 @@ void static BitcoinMiner()
|
||||
fprintf(stderr," mined %s block %d!\n",ASSETCHAINS_SYMBOL,Mining_height);
|
||||
}
|
||||
CValidationState state;
|
||||
if ( ASSETCHAINS_CC == 0 && !TestBlockValidity(state,B, chainActive.LastTip(), true, false))
|
||||
if ( !TestBlockValidity(state,B, chainActive.LastTip(), true, false))
|
||||
{
|
||||
h = UintToArith256(B.GetHash());
|
||||
for (z=31; z>=0; z--)
|
||||
|
||||
Reference in New Issue
Block a user