Skip to content

fuzz: Minor improvements to tx_package_eval target - #28825

Merged
fanquake merged 2 commits into
bitcoin:masterfrom
instagibbs:2023-11-package_fuzz_impr
Nov 16, 2023
Merged

fanquake merged 2 commits into
bitcoin:masterfrom
instagibbs:2023-11-package_fuzz_impr

Conversation

@instagibbs

@instagibbs instagibbs commented Nov 8, 2023 •

Copy link
Copy Markdown
Member

Exercises DIFFERENT_WITNESS by using "blank" WSH() and allowing witness to determine wtxid, and attempts to make invalid/duplicate inputs.

@DrahtBot

DrahtBot commented Nov 8, 2023 •

Copy link
Copy Markdown
Contributor

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

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK dergoegge

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@DrahtBot DrahtBot added the Tests label Nov 8, 2023
@fanquake
fanquake requested review from dergoegge and glozow November 8, 2023 17:16
Comment thread src/test/fuzz/package_eval.cpp Resolved
@instagibbs
instagibbs force-pushed the 2023-11-package_fuzz_impr branch from de541ea to 6a91791 Compare November 9, 2023 14:07
Comment thread src/test/fuzz/package_eval.cpp Resolved

@dergoegge dergoegge left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@fanquake
fanquake requested a review from maflcko November 13, 2023 10:23

@maflcko maflcko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice

Comment thread src/test/util/script.h
Comment on lines +30 to +31
static const std::vector<std::vector<uint8_t>> P2WSH_EMPTY_TRUE_STACK{{static_cast<uint8_t>(OP_TRUE)}, {}};
static const std::vector<std::vector<uint8_t>> P2WSH_EMPTY_TWO_STACK{{static_cast<uint8_t>(OP_2)}, {}};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
static const std::vector<std::vector<uint8_t>> P2WSH_EMPTY_TRUE_STACK{{static_cast<uint8_t>(OP_TRUE)}, {}};
static const std::vector<std::vector<uint8_t>> P2WSH_EMPTY_TWO_STACK{{static_cast<uint8_t>(OP_2)}, {}};
static const std::vector<std::vector<uint8_t>> P2WSH_EMPTY_TRUE_STACK{{uint8_t{OP_TRUE}}, {}};
static const std::vector<std::vector<uint8_t>> P2WSH_EMPTY_TWO_STACK{{uint8_t{OP_2}}, {}};

nit: Use the safe cast for new code, where possible, over the narrowing one.

Also, could use EMPTY instead of {}. But anything is fine here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

will do if I touch again

@glozow glozow mentioned this pull request Nov 14, 2023
57 tasks done
@fanquake
fanquake merged commit 6b7bf90 into bitcoin:master Nov 16, 2023
@bitcoin bitcoin locked and limited conversation to collaborators Nov 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants