|
|
@ -305,7 +305,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) |
|
|
|
|
|
|
|
|
|
|
|
// Fill in header
|
|
|
|
// Fill in header
|
|
|
|
pblock->hashPrevBlock = pindexPrev->GetBlockHash(); |
|
|
|
pblock->hashPrevBlock = pindexPrev->GetBlockHash(); |
|
|
|
UpdateTime(*pblock, pindexPrev); |
|
|
|
UpdateTime(pblock, pindexPrev); |
|
|
|
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock); |
|
|
|
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock); |
|
|
|
pblock->nNonce = 0; |
|
|
|
pblock->nNonce = 0; |
|
|
|
pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(pblock->vtx[0]); |
|
|
|
pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(pblock->vtx[0]); |
|
|
@ -538,7 +538,7 @@ void static BitcoinMiner(CWallet *pwallet) |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
// Update nTime every few seconds
|
|
|
|
// Update nTime every few seconds
|
|
|
|
UpdateTime(*pblock, pindexPrev); |
|
|
|
UpdateTime(pblock, pindexPrev); |
|
|
|
if (Params().AllowMinDifficultyBlocks()) |
|
|
|
if (Params().AllowMinDifficultyBlocks()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Changing pblock->nTime can change work required on testnet:
|
|
|
|
// Changing pblock->nTime can change work required on testnet:
|
|
|
|