Test
This commit is contained in:
@@ -411,7 +411,7 @@ bool DiceValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx)
|
|||||||
if ( (iswin= DiceIsWinner(entropy,txid,tx,vinTx,hash,sbits,minbet,maxbet,maxodds,timeoutblocks,fundingtxid)) != 0 )
|
if ( (iswin= DiceIsWinner(entropy,txid,tx,vinTx,hash,sbits,minbet,maxbet,maxodds,timeoutblocks,fundingtxid)) != 0 )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"DiceIsWinner.%d\n",iswin);
|
fprintf(stderr,"DiceIsWinner.%d\n",iswin);
|
||||||
DiceQueue(iswin,sbits,fundingtxid,txid);
|
//DiceQueue(iswin,sbits,fundingtxid,txid);
|
||||||
}
|
}
|
||||||
//return eval->Invalid("dont confirm bet during debug");
|
//return eval->Invalid("dont confirm bet during debug");
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -4551,11 +4551,11 @@ bool ProcessNewBlock(bool from_miner,int32_t height,CValidationState &state, CNo
|
|||||||
auto verifier = libzcash::ProofVerifier::Disabled();
|
auto verifier = libzcash::ProofVerifier::Disabled();
|
||||||
hash = pblock->GetHash();
|
hash = pblock->GetHash();
|
||||||
//fprintf(stderr,"ProcessBlock %d\n",(int32_t)chainActive.LastTip()->nHeight);
|
//fprintf(stderr,"ProcessBlock %d\n",(int32_t)chainActive.LastTip()->nHeight);
|
||||||
if ( chainActive.LastTip() != 0 )
|
|
||||||
komodo_currentheight_set(chainActive.LastTip()->nHeight);
|
|
||||||
checked = CheckBlock(&futureblock,height!=0?height:komodo_block2height(pblock),0,*pblock, state, verifier,0);
|
|
||||||
{
|
{
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
|
if ( chainActive.LastTip() != 0 )
|
||||||
|
komodo_currentheight_set(chainActive.LastTip()->nHeight);
|
||||||
|
checked = CheckBlock(&futureblock,height!=0?height:komodo_block2height(pblock),0,*pblock, state, verifier,0);
|
||||||
bool fRequested = MarkBlockAsReceived(hash);
|
bool fRequested = MarkBlockAsReceived(hash);
|
||||||
fRequested |= fForceProcessing;
|
fRequested |= fForceProcessing;
|
||||||
if ( checked != 0 && komodo_checkPOW(0,pblock,height) < 0 ) //from_miner && ASSETCHAINS_STAKED == 0
|
if ( checked != 0 && komodo_checkPOW(0,pblock,height) < 0 ) //from_miner && ASSETCHAINS_STAKED == 0
|
||||||
|
|||||||
@@ -1018,7 +1018,7 @@ void static BitcoinMiner()
|
|||||||
fprintf(stderr," mined %s block %d!\n",ASSETCHAINS_SYMBOL,Mining_height);
|
fprintf(stderr," mined %s block %d!\n",ASSETCHAINS_SYMBOL,Mining_height);
|
||||||
}
|
}
|
||||||
CValidationState state;
|
CValidationState state;
|
||||||
if ( !TestBlockValidity(state,B, chainActive.LastTip(), true, false))
|
if ( ASSETCHAINS_CC == 0 && !TestBlockValidity(state,B, chainActive.LastTip(), true, false))
|
||||||
{
|
{
|
||||||
h = UintToArith256(B.GetHash());
|
h = UintToArith256(B.GetHash());
|
||||||
for (z=31; z>=0; z--)
|
for (z=31; z>=0; z--)
|
||||||
|
|||||||
Reference in New Issue
Block a user