From 3283cb53e7f714dadbb66fa67dee5c39c0b71757 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 16 Apr 2018 05:02:26 +0300 Subject: [PATCH] Prints --- src/main.cpp | 9 ++++++--- src/miner.cpp | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 3a8859851..edae9c5aa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3564,12 +3564,15 @@ bool CheckBlock(int32_t height,CBlockIndex *pindex,const CBlock& block, CValidat // Check that the header is valid (particularly PoW). This is mostly // redundant with the call in AcceptBlockHeader. if (!CheckBlockHeader(height,pindex,block,state,fCheckPOW)) + { + + fprintf(stderr,"checkblockheader error\n"); return false; - //komodo_index2pubkey33(pubkey33,pindex,height); + } komodo_block2pubkey33(pubkey33,(CBlock *)&block); if ( fCheckPOW && !CheckProofOfWork(height,pubkey33,block.GetHash(), block.nBits, Params().GetConsensus()) ) { - komodo_reverify_blockcheck(state,height,pindex); + //komodo_reverify_blockcheck(state,height,pindex); return state.DoS(1, error("CheckBlock(): proof of work failed"),REJECT_INVALID, "high-hash"); } // Check the merkle root. @@ -3626,7 +3629,7 @@ bool CheckBlock(int32_t height,CBlockIndex *pindex,const CBlock& block, CValidat //if ( komodo_check_deposit(ASSETCHAINS_SYMBOL[0] == 0 ? height : pindex != 0 ? (int32_t)pindex->nHeight : chainActive.Tip()->nHeight+1,block,pindex==0||pindex->pprev==0?0:pindex->pprev->nTime) < 0 ) { static uint32_t counter; - if ( counter++ < 100 && ASSETCHAINS_STAKED == 0 ) + //if ( counter++ < 100 && ASSETCHAINS_STAKED == 0 ) fprintf(stderr,"check deposit rejection\n"); return(false); } diff --git a/src/miner.cpp b/src/miner.cpp index a2e8c5aa7..b419b7e16 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -491,8 +491,8 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) if ( !TestBlockValidity(state, *pblock, pindexPrev, false, false)) { static uint32_t counter; - if ( counter++ < 100 && ASSETCHAINS_STAKED == 0 ) - fprintf(stderr,"warning: testblockvalidity failed\n"); + //if ( counter++ < 100 && ASSETCHAINS_STAKED == 0 ) + fprintf(stderr,"warning: miner testblockvalidity failed\n"); return(0); } }