Auto merge of #2931 - jc23424:hashreserved-diskindex, r=str4d

read hashReserved from disk

This fixes a bug where the hashReserved field of the block header is not properly read back into CBlockIndex when loaded from disk. This happens to cause no issues currently because hashReserved has always been its default value (== 0), but if a block were ever mined where this was not the case, headers read back from disk would appear to have an invalid solution
This commit is contained in:
Homu 2018-02-21 14:35:58 -08:00
commit 6264927fef
1 changed files with 1 additions and 0 deletions

View File

@ -304,6 +304,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
pindexNew->hashAnchor = diskindex.hashAnchor;
pindexNew->nVersion = diskindex.nVersion;
pindexNew->hashMerkleRoot = diskindex.hashMerkleRoot;
pindexNew->hashReserved = diskindex.hashReserved;
pindexNew->nTime = diskindex.nTime;
pindexNew->nBits = diskindex.nBits;
pindexNew->nNonce = diskindex.nNonce;