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

Fix db ledger keys endianess #1885

Merged
merged 1 commit into from
Nov 22, 2018
Merged

Conversation

carllin
Copy link
Contributor

@carllin carllin commented Nov 22, 2018

Problem

The default comparator for Rocksdb is a comparator that uses lexicographic byte-wise ordering. This means storing the unsigned integer keys using the current LittleEndian ordering would order larger unsigned integers before smaller unsigned integers when compared byte-wise.

Summary of Changes

Switch LittleEndian to BigEndian when storing keys in DbLedger

Fixes #

@carllin carllin requested review from mvines and rob-solana November 22, 2018 01:31
@carllin carllin changed the title Fix db ledger keys Fix db ledger keys endianess Nov 22, 2018
@carllin carllin merged commit a3321a5 into solana-labs:master Nov 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants