Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync_local would fail to load all existing blocks in the proper order… #2

Merged
merged 1 commit into from Nov 9, 2017

Conversation

@steven-p-walsh
Copy link
Contributor

steven-p-walsh commented Nov 5, 2017

Depending on the operating system of the user. The sync_local function may fail to properly import all blocks. The issue is glob would not always read the files in the desired order. By sorting the imported blocks by index before committing to the chain, we can guarantee the order.

… depending on the operating system of the user. Changed the function to sort the imported blocks by index before attemping to build the chain
@jackschultz

This comment has been minimized.

Copy link
Owner

jackschultz commented Nov 5, 2017

Awesome. One question, what do you think is better, throwing the blocks into a list and sorting that like you did, or sorting the filenames so sorting is quicker. Not exactly sure if there'd be a big time / size difference, especially with the few blocks we'd be dealing with now.

@jackschultz jackschultz merged commit d334a52 into jackschultz:master Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.