Skip to content

Commit 6848561

Browse files
TheBlueMattinstagibbs
authored andcommitted
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.
1 parent 6bb5609 commit 6848561

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/miner.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -589,13 +589,7 @@ void BlockAssembler::addPriorityTxs()
589589

590590
void IncrementExtraNonce(CBlock* pblock, const CBlockIndex* pindexPrev, unsigned int& nExtraNonce)
591591
{
592-
// Update nExtraNonce
593-
static uint256 hashPrevBlock;
594-
if (hashPrevBlock != pblock->hashPrevBlock)
595-
{
596-
nExtraNonce = 0;
597-
hashPrevBlock = pblock->hashPrevBlock;
598-
}
592+
assert(pblock->hashPrevBlock == pindexPrev->GetBlockHash());
599593
++nExtraNonce;
600594
unsigned int nHeight = pindexPrev->nHeight+1; // Height first in coinbase required for block.version=2
601595
CMutableTransaction txCoinbase(pblock->vtx[0]);

0 commit comments

Comments
 (0)