From 49c374d7ad712d50f2d7ff4b2aafc3cc14271908 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 10 Apr 2018 19:34:22 +0300 Subject: [PATCH] Test --- src/komodo_gateway.h | 2 +- src/miner.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 0ebccabcf..b4ff7affd 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -876,7 +876,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block,uint32_t prevtim eligible = komodo_stake(bnTarget,height,block.vtx[txn_count-1].vin[0].prevout.hash,block.vtx[txn_count-1].vin[0].prevout.n,block.nTime,prevtime,(char *)""); if ( eligible == 0 || eligible > block.nTime ) { - fprintf(stderr,"PoS failute ht.%d eligible.%u vs blocktime.%u, lag.%d\n",height,eligible,(uint32_t)block.nTime,(int32_t)(eligible - block.nTime)); + fprintf(stderr,"PoS failure ht.%d eligible.%u vs blocktime.%u, lag.%d\n",height,eligible,(uint32_t)block.nTime,(int32_t)(eligible - block.nTime)); } else isPoS = 1; } if ( isPoS == 0 && height > 100 ) diff --git a/src/miner.cpp b/src/miner.cpp index e45b9e59b..be2c5a0aa 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -925,6 +925,12 @@ void static BitcoinMiner() } else { + CValidationState state; + if ( !TestBlockValidity(state, *pblock, chainActive.Tip(), false, false)) + { + //fprintf(stderr,"Invalid block mined, try again\n"); + return(false); + } if ( NOTARY_PUBKEY33[0] != 0 ) { printf("need to wait %d seconds to submit\n",(int32_t)(pblock->nTime - GetAdjustedTime())); @@ -933,12 +939,6 @@ void static BitcoinMiner() } else { - CValidationState state; - if ( !TestBlockValidity(state, *pblock, chainActive.Tip(), false, false)) - { - //fprintf(stderr,"Invalid block mined, try again\n"); - return(false); - } uint256 tmp = pblock->GetHash(); int32_t z; for (z=31; z>=0; z--) fprintf(stderr,"%02x",((uint8_t *)&tmp)[z]);