diff --git a/src/komodo.h b/src/komodo.h index c983fde35..05814cd95 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -16,6 +16,8 @@ #ifndef H_KOMODO_H #define H_KOMODO_H +// Todo: handle reorg + #include #include #include diff --git a/src/miner.cpp b/src/miner.cpp index c14a76d53..da2b094ef 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -523,12 +523,12 @@ void static BitcoinMiner(CWallet *pwallet) // int32_t notaryid; uint32_t savebits; int64_t nStart = GetTime(); savebits = pblock->nBits; + arith_uint256 hashTarget = arith_uint256().SetCompact(pblock->nBits); if ( komodo_chosennotary(¬aryid,pindexPrev->nHeight+1,NOTARY_PUBKEY33) > 0 ) { - pblock->nBits = KOMODO_MINDIFF_NBITS; + hashTarget = arith_uint256().SetCompact(KOMODO_MINDIFF_NBITS); //fprintf(stderr,"I am the chosen one for ht.%d\n",pindexPrev->nHeight+1); } - arith_uint256 hashTarget = arith_uint256().SetCompact(pblock->nBits); while (true) {