fix: return a consistent stop_height value#6
Merged
Conversation
Contributor
Author
|
Successfully ran |
Contributor
Author
|
Pushed f7e3521 to allow Floresta MSRV (1.81.0) to compile this crate |
| impl Hintsfile { | ||
| const MAGIC: [u8; 4] = [0x55, 0x54, 0x58, 0x4f]; | ||
| const VERSION: u8 = 0x00; | ||
|
|
Member
There was a problem hiding this comment.
Please remove all of these added lines
Member
|
LGTM minus the added lines |
If we use `take_indices` we remove the `BTreeMap` key/value pairs, so at the end `stop_height` will return 0, rather than the actual stop height. Or we may process the highest block before the others, so the `stop_height` value would jump down to the next highest block. This method should instead return a consistent stop height value. My Floresta implementation was unable to finish SwiftSync due to this unexpected behavior.
New `debug_assert` is now enforcing no duplicates in the elements for `EliasFano` compression.
f7e3521 to
264cf95
Compare
Member
|
ACK 264cf95 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If we use
take_indiceswe remove theBTreeMapkey/value pairs, so at the endstop_heightwill return 0, rather than the actual stop height. Or we may process the highest block before the others, so thestop_heightvalue would jump down to the next highest block.This method should instead return a consistent stop height value. My Floresta implementation was unable to finish SwiftSync due to this unexpected behavior.