From ec123865e098fe3aca4726e9d9efff02d85010d8 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 13 Mar 2017 20:20:46 +0200 Subject: [PATCH] Test --- src/main.cpp | 12 ++++++++++++ src/miner.cpp | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 307d1d460..be726d4c3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3448,13 +3448,25 @@ bool TestBlockValidity(CValidationState &state, const CBlock& block, CBlockIndex // NOTE: CheckBlockHeader is called by CheckBlock if (!ContextualCheckBlockHeader(block, state, pindexPrev)) + { + fprintf(stderr,"TestBlockValidity A error\n"); return false; + } if (!CheckBlock(indexDummy.nHeight,0,block, state, verifier, fCheckPOW, fCheckMerkleRoot)) + { + fprintf(stderr,"TestBlockValidity B error\n"); return false; + } if (!ContextualCheckBlock(block, state, pindexPrev)) + { + fprintf(stderr,"TestBlockValidity C error\n"); return false; + } if (!ConnectBlock(block, state, &indexDummy, viewNew, true)) + { + fprintf(stderr,"TestBlockValidity D error\n"); return false; + } assert(state.IsValid()); return true; diff --git a/src/miner.cpp b/src/miner.cpp index 376c12c63..6d110a46c 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -605,7 +605,7 @@ void static BitcoinMiner(CWallet *pwallet) Mining_height = pindexPrev->nHeight+1; Mining_start = (uint32_t)time(NULL); } - //if ( ASSETCHAINS_SYMBOL[0] != 0 ) + if ( ASSETCHAINS_SYMBOL[0] != 0 ) fprintf(stderr,"%s create new block ht.%d\n",ASSETCHAINS_SYMBOL,Mining_height); CBlockTemplate *ptr = CreateNewBlockWithKey(reservekey); if ( ptr == 0 ) @@ -627,7 +627,7 @@ void static BitcoinMiner(CWallet *pwallet) // uint8_t pubkeys[66][33]; int mids[66],gpucount,nonzpkeys,i,j,externalflag; uint32_t savebits; int64_t nStart = GetTime(); savebits = pblock->nBits; - arith_uint256 hashTarget = arith_uint256().SetCompact(pblock->nBits); + ari`th_uint256 hashTarget = arith_uint256().SetCompact(pblock->nBits); if ( ASSETCHAINS_SYMBOL[0] == 0 && notaryid >= 0 )//komodo_is_special(pindexPrev->nHeight+1,NOTARY_PUBKEY33) > 0 ) { j = 65;