Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
CLTV: Add more tests to improve coverage #6368
This should be a pretty straightforward code review, adding a few tests to the script interpreter when CHECKLOCKTIMEVERIFY is enabled.
The test cases improve coverage for these cases:
Four cases included: * The CLTV operand type mismatches the tx locktime. In the script it is 1 (interpreted as block height), but in the tx is 500000000 (interpreted as date) * The stack is empty when executing OP_CLTV * The tx is final by having only one input with MAX_INT sequence number * The operand for CLTV is negative (after OP_0 OP_1 OP_SUB)