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

make sure we use BigEndian when reading numbers via StreamingReader #2821

Merged
merged 1 commit into from
May 13, 2019

Conversation

antiochp
Copy link
Member

Resolves #2820.

This PR fixes a narrow part of #2820 where we are not using BigEndian explicitly in StreamingReader.

This has an additional benefit where we get rid of a couple of levels of indirection. We used to deserialize numbers (u64 etc.) in a StreamingReader by instantiating a new BinReader within the deserialize call for each number being deserialized.

@hashmap
Copy link
Contributor

hashmap commented May 10, 2019

What if we just switch to blocking io?

@antiochp
Copy link
Member Author

What if we just switch to blocking io?

That would be one option that would presumably simplify this. I'm not 100% convinced blocking io is the right solution here.

@antiochp antiochp requested review from hashmap and ignopeverell May 13, 2019 12:06
@antiochp antiochp added this to the 1.1.0 milestone May 13, 2019
Copy link
Contributor

@ignopeverell ignopeverell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good improvement regardless of what we end up changing in the future.

@ignopeverell ignopeverell merged commit 4ba7b0a into mimblewimble:master May 13, 2019
@antiochp antiochp deleted the read_exact_fix branch May 14, 2019 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

byteorder crate does not play nicely with our "non-blocking" IO
3 participants