Remove extra nonce reset logic in IncrementExtraNonce

I assume this was added to prevent deanonymization, but that
doesn't matter anymore since its only used on regtest.
This commit is contained in:
Matt Corallo 2016-01-18 22:06:34 -08:00 committed by instagibbs
parent 6bb56092b8
commit 6848561bd4

View file

@ -589,13 +589,7 @@ void BlockAssembler::addPriorityTxs()
void IncrementExtraNonce(CBlock* pblock, const CBlockIndex* pindexPrev, unsigned int& nExtraNonce)
{
// Update nExtraNonce
static uint256 hashPrevBlock;
if (hashPrevBlock != pblock->hashPrevBlock)
{
nExtraNonce = 0;
hashPrevBlock = pblock->hashPrevBlock;
}
assert(pblock->hashPrevBlock == pindexPrev->GetBlockHash());
++nExtraNonce;
unsigned int nHeight = pindexPrev->nHeight+1; // Height first in coinbase required for block.version=2
CMutableTransaction txCoinbase(pblock->vtx[0]);