Fix(core): Fix TxOutIter::size_hint to use output count - #215
Merged
Conversation
alexanderwiederin
force-pushed
the
fix-output-size-hint
branch
3 times, most recently
from
August 14, 2026 12:25
1657716 to
6e73cd3
Compare
alexanderwiederin
marked this pull request as ready for review
August 14, 2026 12:31
TxOutIter::size_hint to use output count
Owner
|
This needs a rebase now. |
alexanderwiederin
force-pushed
the
fix-output-size-hint
branch
from
August 25, 2026 16:18
6e73cd3 to
aec4a43
Compare
Collaborator
Author
|
Rebased - thanks! |
jaoleal
approved these changes
Aug 25, 2026
sedited
approved these changes
Aug 25, 2026
sedited
left a comment
Owner
There was a problem hiding this comment.
Will see that I can make a release tomorrow.
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.
Summary
TxOutIter::size_hintcomputed its remaining count frominput_count()rather thanoutput_count(), so on any transaction where the two differ it reported the wrong number of remaining items.Why this wasn't caught
Neither iterator had any coverage of
size_hintorlen. The existingtest_transaction_outputs_iteratordrives a manualforloop with a hand-rolled counter, which only exercisesnext(), so the hint was invisible to the suite.