mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Merge pull request #4377
654871dreplace ComputeMinWork with CheckMinWork (jtimon)b343c1aMove CBlockIndex::GetBlockWork() to pow::GetProofIncrement(nBits) (jtimon)c2c02f3Move UpdateTime to pow (jtimon)
This commit is contained in:
commit
d1062e32fa
7 changed files with 53 additions and 65 deletions
|
|
@ -307,7 +307,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
|||
|
||||
// Fill in header
|
||||
pblock->hashPrevBlock = pindexPrev->GetBlockHash();
|
||||
UpdateTime(*pblock, pindexPrev);
|
||||
UpdateTime(pblock, pindexPrev);
|
||||
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock);
|
||||
pblock->nNonce = 0;
|
||||
pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(pblock->vtx[0]);
|
||||
|
|
@ -540,7 +540,7 @@ void static BitcoinMiner(CWallet *pwallet)
|
|||
break;
|
||||
|
||||
// Update nTime every few seconds
|
||||
UpdateTime(*pblock, pindexPrev);
|
||||
UpdateTime(pblock, pindexPrev);
|
||||
if (Params().AllowMinDifficultyBlocks())
|
||||
{
|
||||
// Changing pblock->nTime can change work required on testnet:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue