-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
txscript: add stake opcode tests. #1383
Conversation
txscript/data/script_tests.json
Outdated
|
||
["SSTX related tests"], | ||
["1 1 ADD", "SSTX 2 OP_EQUAL", "NONE", "OK", "SSTX is a NOP"], | ||
["DATA_5 DATA_4 0x7a{4}", "SSTX HASH160 DATA_20 0x246bda0f2b9aba6dc78c6259970e45e6af960d46 EQUAL", "NONE", "ERR_EVAL_FALSE", "SSTX false eval"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest SSTX almost P2SH
for the comment since it's a bit more descriptive. Likewise for the others.
txscript/data/script_tests.json
Outdated
["SSTX related tests"], | ||
["1 1 ADD", "SSTX 2 OP_EQUAL", "NONE", "OK", "SSTX is a NOP"], | ||
["DATA_5 DATA_4 0x7a{4}", "SSTX HASH160 DATA_20 0x246bda0f2b9aba6dc78c6259970e45e6af960d46 EQUAL", "NONE", "ERR_EVAL_FALSE", "SSTX almost P2SH"], | ||
["DATA_5 1 3 DATA_2 ADD SSTX", "HASH160 DATA_20 0x30c7ecf9ff5508c105071194d979b13ed90a82b7 EQUAL", "NONE", "OK", "SSTX (P2SH)"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As with #1381, these aren't all actually testing the intended thing, rather they're just pushing data to the stack.
txscript/data/script_tests.json
Outdated
["SSTX related tests"], | ||
["1 1 ADD", "SSTX 2 OP_EQUAL", "NONE", "OK", "SSTX is a NOP"], | ||
["DATA_5 DATA_4 0x7a{4}", "SSTX HASH160 DATA_20 0x246bda0f2b9aba6dc78c6259970e45e6af960d46 EQUAL", "NONE", "ERR_EVAL_FALSE", "SSTX almost P2SH"], | ||
["1 3 DATA_2 ADD SSTX", "HASH160 DATA_20 0xdcbd287f8a23bf97cea3c77392854976a6feff8f EQUAL", "NONE", "ERR_P2SH_STAKE_OPCODES", "SSTX (P2SH)"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment should call out the SSTX is invalid in a p2sh script. Same with others.
addrmgr: store address' supported service bits
This is work towards #1331.