test: Expand script verification tests to cover all output types and flags (continued)#146
Merged
sedited merged 1 commit intosedited:masterfrom Mar 26, 2026
Conversation
…flags New output types covered: P2SH-multisig, CLTV, CSV, P2WPKH, P2WSH, P2TR script-path. New flags covered: VERIFY_NONE, VERIFY_P2SH, VERIFY_DERSIG, VERIFY_NULLDUMMY, VERIFY_CHECKLOCKTIMEVERIFY, VERIFY_CHECKSEQUENCEVERIFY. Split script_verify_test into per-output-type tests. Each test checks validity with and without its relevant flag. Co-authored-by: stringintech <stringintech@gmail.com>
sedited
approved these changes
Mar 26, 2026
Owner
sedited
left a comment
There was a problem hiding this comment.
LGTM
We should really expose those granular script error types, would make looking this over much easier.
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.
Addresses #132.
Summary
VERIFY_NONE,VERIFY_P2SH,VERIFY_DERSIG,VERIFY_NULLDUMMY,VERIFY_CHECKLOCKTIMEVERIFY,VERIFY_CHECKSEQUENCEVERIFYscript_verify_testinto separate tests for each output typeApproach
Subtests are ordered from oldest output types to newest. Each test follows the same pattern:
For CLTV and CSV, changing locktime/sequence requires a fresh signature, so the invalid case uses a re-signed transaction rather than a byte flip. Unlike the other tests which use real mainnet transactions, the CLTV and CSV test data was created on regtest using a functional test.
Supersedes
This PR continues #137 by @stringintech with the following review feedback addressed:
tx_corrupted_siginstead of// same tx but with corrupted signature)