diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2024-05-09 18:34:14 -0400 |
---|---|---|
committer | Martin Zumsande <mzumsande@gmail.com> | 2024-05-14 14:54:27 -0400 |
commit | e41667b720372dae8438ea86e9819027e62b54e0 (patch) | |
tree | dab85a50e65941b36af6fb97653a3a0bf3053a24 /test/lint | |
parent | 17103637c6fa2dfcf5374ebb0cd715e540dd4ce1 (diff) | |
download | bitcoin-e41667b720372dae8438ea86e9819027e62b54e0.tar.xz |
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>
Diffstat (limited to 'test/lint')
0 files changed, 0 insertions, 0 deletions