mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
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:
parent
6bb56092b8
commit
6848561bd4
1 changed files with 1 additions and 7 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue