diff --git a/src/main.cpp b/src/main.cpp index 1603bd572..1c7461617 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2967,8 +2967,8 @@ bool CheckBlockHeader(int32_t height,CBlockIndex *pindex, const CBlockHeader& bl // Check proof of work matches claimed amount //printf("from checkblockheader pindex.%p %p\n",pindex,mapBlockIndex[blockhdr.GetHash()]); - if ( pindex == 0 ) - pindex = mapBlockIndex[blockhdr.GetHash()]; + //if ( pindex == 0 ) + // pindex = mapBlockIndex[blockhdr.GetHash()]; komodo_index2pubkey33(pubkey33,pindex,height); if ( fCheckPOW && !CheckProofOfWork(height,pubkey33,blockhdr.GetHash(), blockhdr.nBits, Params().GetConsensus()) ) return state.DoS(50, error("CheckBlockHeader(): proof of work failed"),REJECT_INVALID, "high-hash"); diff --git a/src/pow.cpp b/src/pow.cpp index 10b5fe0fd..a2a965f39 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -112,9 +112,10 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in arith_uint256 bnTarget; bnTarget.SetCompact(nBits, &fNegative, &fOverflow); - if ( height > 34000 && (special= komodo_heightnotary(height,pubkey33)) != 0 ) // 0 -> non-special notary + if ( height > 34000 ) // 0 -> non-special notary { int32_t i,nonz = 0; + special = komodo_heightnotary(height,pubkey33); for (i=0; i<33; i++) { if ( pubkey33[i] != 0 )