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

Improve cancellation safety by switching read_exacts to reads #78

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

nyonson
Copy link
Collaborator

@nyonson nyonson commented Oct 17, 2024

The underlying read_exact implementations are not cancellation safe themselves, so have to get rid of them and hold onto state manually to ensure no dropped bytes.

Pretty straight forward code change, but I had to do a little deep dive to wrap my head around what was going on: https://blog.yonson.dev/log/2024-10-vol1/

Closes #75

@nyonson nyonson force-pushed the cancellation-safety branch from facd501 to a3f16bb Compare October 17, 2024 19:37
@nyonson nyonson marked this pull request as ready for review October 17, 2024 19:38
@nyonson nyonson requested a review from rustaceanrob October 17, 2024 19:43
@rustaceanrob
Copy link
Collaborator

ACK a3f16bb

@rustaceanrob rustaceanrob merged commit 943733f into rust-bitcoin:main Oct 17, 2024
7 checks passed
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.

Make decrypt more cancellation safe
2 participants