Rename min_bytes_needed to read_limit#5107
Merged
apoelstra merged 2 commits intorust-bitcoin:masterfrom Oct 10, 2025
Merged
Conversation
tcharding
previously approved these changes
Oct 8, 2025
Member
|
nit: The second patch should not have |
Contributor
Author
|
Ah dang, I have totally been messing that up. |
65d6b78 to
8a94ec7
Compare
Member
|
Grab you box and out the building by 3, your fired. |
Member
|
Gr, that second ack was supposed to be a merge. |
Member
|
Needs rebase now, sorry. (I think this one is gonna be a bit of a PITA to get in while we're doing any other decoder work.) |
The `min_bytes_needed` name is a bit of a misnomer because it implies a lower bound instead of an upper. I believe the original intention was to capture "minimum bytes needed to advance the state of the decoder", but that is a little wordy. Updated to `read_limit` since this is an upper bound to protect against over consuming bytes the decoder doesn't know what to do with.
8a94ec7 to
38b47c7
Compare
tcharding
approved these changes
Oct 9, 2025
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.
The
min_bytes_neededname is a bit of a misnomer because it implies a lower bound instead of an upper. I believe the original intention was to capture "minimum bytes needed to advance the state of the decoder", but that is a little wordy. Updated toread_limitsince this is an upper bound to protect against over consuming bytes the decoder doesn't know what to do with.