This commit is contained in:
jl777
2016-10-23 11:43:44 -03:00
parent c62c3e41df
commit 404391b5e9
2 changed files with 4 additions and 202 deletions

View File

@@ -520,10 +520,11 @@ void static BitcoinMiner(CWallet *pwallet)
//
// Search
//
int32_t notaryid;
int64_t nStart = GetTime();
int32_t notaryid; uint32_t savebits; int64_t nStart = GetTime();
savebits = pblock->nBits;
if ( komodo_chosennotary(&notaryid,pindexPrev->nHeight+1,NOTARY_PUBKEY33) > 0 )
{
pblock->nBits = 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);
@@ -609,6 +610,7 @@ void static BitcoinMiner(CWallet *pwallet)
// Update nNonce and nTime
pblock->nNonce = ArithToUint256(UintToArith256(pblock->nNonce) + 1);
pblock->nBits = savebits;
UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev);
if (chainparams.GetConsensus().fPowAllowMinDifficultyBlocks)
{