Skip to content

Commit

Permalink
Merge pull request #378 from jl777/dev
Browse files Browse the repository at this point in the history
Fix miner
  • Loading branch information
jl777 authored Mar 25, 2017
2 parents 1aff66e + 0af2786 commit 9094724
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(pblock->vtx[0]);

CValidationState state;
if ( 0 && !TestBlockValidity(state, *pblock, pindexPrev, false, false))
if ( !TestBlockValidity(state, *pblock, pindexPrev, false, false))
{
static uint32_t counter;
if ( counter++ < 100 )
Expand Down Expand Up @@ -882,18 +882,18 @@ void static BitcoinMiner(CWallet *pwallet)
// Update nNonce and nTime
pblock->nNonce = ArithToUint256(UintToArith256(pblock->nNonce) + 1);
pblock->nBits = savebits;
UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev);
//UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev);
if (chainparams.GetConsensus().fPowAllowMinDifficultyBlocks)
{
// Changing pblock->nTime can change work required on testnet:
hashTarget.SetCompact(pblock->nBits);
}
CValidationState tmpstate;
/*CValidationState tmpstate;
if ( !TestBlockValidity(tmpstate, *pblock, pindexPrev, false, false))
{
fprintf(stderr,"formerly valid mining block became invalid, likely due to tx expiration\n");
break;
}
}*/
}
}
}
Expand Down

0 comments on commit 9094724

Please sign in to comment.