From a839f3a384060d8b016dac4cb551c5715d47865d Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 31 Jul 2018 03:30:21 -1100 Subject: [PATCH] Test --- src/cc/dice.cpp | 2 +- src/main.cpp | 6 +++--- src/miner.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cc/dice.cpp b/src/cc/dice.cpp index 1d9dfd5bd..f905c77b4 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -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 ) { fprintf(stderr,"DiceIsWinner.%d\n",iswin); - DiceQueue(iswin,sbits,fundingtxid,txid); + //DiceQueue(iswin,sbits,fundingtxid,txid); } //return eval->Invalid("dont confirm bet during debug"); break; diff --git a/src/main.cpp b/src/main.cpp index 5371bed51..79182bad8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4551,11 +4551,11 @@ bool ProcessNewBlock(bool from_miner,int32_t height,CValidationState &state, CNo auto verifier = libzcash::ProofVerifier::Disabled(); hash = pblock->GetHash(); //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); + 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); fRequested |= fForceProcessing; if ( checked != 0 && komodo_checkPOW(0,pblock,height) < 0 ) //from_miner && ASSETCHAINS_STAKED == 0 diff --git a/src/miner.cpp b/src/miner.cpp index fb2eb2d05..97034e72d 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1018,7 +1018,7 @@ void static BitcoinMiner() fprintf(stderr," mined %s block %d!\n",ASSETCHAINS_SYMBOL,Mining_height); } 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()); for (z=31; z>=0; z--)