mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
converted from "fix possible block db breakage during re-index" bb6acff079
This commit is contained in:
parent
66d96acd19
commit
e3d333f8b2
@ -2742,8 +2742,11 @@ bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAdd
|
||||
pos.nPos = infoLastBlockFile.nSize;
|
||||
}
|
||||
|
||||
infoLastBlockFile.nSize += nAddSize;
|
||||
infoLastBlockFile.AddBlock(nHeight, nTime);
|
||||
if (fKnown)
|
||||
infoLastBlockFile.nSize = std::max(pos.nPos + nAddSize, infoLastBlockFile.nSize);
|
||||
else
|
||||
infoLastBlockFile.nSize += nAddSize;
|
||||
|
||||
if (!fKnown) {
|
||||
unsigned int nOldChunks = (pos.nPos + BLOCKFILE_CHUNK_SIZE - 1) / BLOCKFILE_CHUNK_SIZE;
|
||||
|
Loading…
Reference in New Issue
Block a user