diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-12-04 23:46:30 +0100 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-12-06 22:04:58 +0100 |
commit | c8b2e4426b78e63c0e9565688192963331221984 (patch) | |
tree | 890188b8ad9c0ee306105e4877f396a9609df7d8 | |
parent | d79775a04d6dfc03dfc71d7811375a33e1e5c833 (diff) |
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.
-rw-r--r-- | src/main.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index ed03414173..0e0be2f01e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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) { |