Skip to content

test: check ReadList return value - #338

Open
ryanofsky wants to merge 1 commit into
bitcoin-core:masterfrom
ryanofsky:pr/listtest
Open

test: check ReadList return value#338
ryanofsky wants to merge 1 commit into
bitcoin-core:masterfrom
ryanofsky:pr/listtest

Conversation

@ryanofsky

Copy link
Copy Markdown
Collaborator

This is a followup to #285 (comment), adding a test to verify the ReadList return value and make sure it is compatible with ReadDestTemp

ReadList was originally declared void and did not return the result of
read_dest.update(), silently discarding the return value. When callers
pass a ReadDestTemp or other ReadDest whose update() returns a
constructed value, that value was lost.

Add a test to demonstrate the bug: extend FooCustom with a v3
:List(Int32) / std::vector<int> field and use the assignment pattern
  value.v3 = ReadField(..., ReadDestTemp<std::vector<int>>())
inside CustomReadField. This fails to compile if ReadList returns void
and succeeds with the fix.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DrahtBot

DrahtBot commented Aug 7, 2026

Copy link
Copy Markdown

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
ACK ViniciusCestarii

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

@ryanofsky ryanofsky mentioned this pull request Aug 7, 2026

@ViniciusCestarii ViniciusCestarii left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK 62f25af

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.

3 participants