Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
blockstorage: Don't move cursor backwards in UpdateBlockInfo
Previously, it was possible to move the cursor back to an older file during reindex if blocks are enocuntered out of order during reindex. This would mean that MaxBlockfileNum() would be incorrect, and a wrong DB_LAST_BLOCK could be written to disk. This improves the logic by only ever moving the cursor forward (if possible) but not backwards. Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
- Loading branch information