mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Bugfix: Use timestamp in coinbase rather than "bits", needed to ensure coinbase txn is unique even if address is the same
This commit is contained in:
parent
49c8e53ee2
commit
83f4cd156e
3 changed files with 8 additions and 10 deletions
|
|
@ -1615,15 +1615,14 @@ Value getwork(const Array& params, bool fHelp)
|
|||
vNewBlock.push_back(pblock);
|
||||
}
|
||||
|
||||
// Update nExtraNonce
|
||||
static unsigned int nExtraNonce = 0;
|
||||
static int64 nPrevTime = 0;
|
||||
IncrementExtraNonce(pblock, pindexPrev, nExtraNonce, nPrevTime);
|
||||
|
||||
// Update nTime
|
||||
pblock->nTime = max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
|
||||
pblock->nNonce = 0;
|
||||
|
||||
// Update nExtraNonce
|
||||
static unsigned int nExtraNonce = 0;
|
||||
IncrementExtraNonce(pblock, pindexPrev, nExtraNonce);
|
||||
|
||||
// Save
|
||||
mapNewBlock[pblock->hashMerkleRoot] = make_pair(pblock, pblock->vtx[0].vin[0].scriptSig);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue