mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Update the block file counter in database when using -reindex
This problem is like earth (mostly harmless). After/during a -reindex, it means the statistics about the last block file reported in debug.log are always of blk00000.dat instead of the last file. Apart from that, it means a few more database entries need to be read when finding a file to append to the first time.
This commit is contained in:
parent
d79775a04d
commit
c8b2e4426b
@ -1897,6 +1897,7 @@ bool FindBlockPos(CDiskBlockPos &pos, unsigned int nAddSize, unsigned int nHeigh
|
||||
nLastBlockFile = pos.nFile;
|
||||
infoLastBlockFile.SetNull();
|
||||
pblocktree->ReadBlockFileInfo(nLastBlockFile, infoLastBlockFile);
|
||||
fUpdatedLast = true;
|
||||
}
|
||||
} else {
|
||||
while (infoLastBlockFile.nSize + nAddSize >= MAX_BLOCKFILE_SIZE) {
|
||||
|
Loading…
Reference in New Issue
Block a user